Jump to content

How to write a constants include file?


Lej
 Share

Recommended Posts

So I started building a small program and it started to get a bit big so I decided to move the constants and global variables to a separate file which I could just include. Problem is I'm not sure how to make a constant or global array with set values in this file. I tried a lots of different way and looked on the web but counldn't find how to do it. This is what I want to have:

Global $NonConstantGlobalArray
$NonConstantGlobalArray[0][0] = 1
$NonConstantGlobalArray[1][0] = 2
$NonConstantGlobalArray[2][0] = 3

$NonConstantGlobalArray[0][1] = "tex1t"
$NonConstantGlobalArray[1][1] = "text2"
$NonConstantGlobalArray[2][1] = "text3"

Global Const $ConstGlobalArray
$ConstantGlobalArray[0][0] = 4
$ConstantGlobalArray[1][0] = 5
$ConstantGlobalArray[2][0] = 6

$ConstantGlobalArray[0][1] = "text4"
$ConstantGlobalArray[1][1] = "text5"
$ConstantGlobalArray[2][1] = "text6"
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...