Lej Posted November 27, 2006 Share Posted November 27, 2006 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 More sharing options...
MHz Posted November 28, 2006 Share Posted November 28, 2006 Try this format Global Const $ConstantGlobalArray[2][3] = [[4, 5, 6], ["text4", "text5", "text6"]] ;test For $i = 0 To UBound($ConstantGlobalArray) -1 For $ii = 0 To UBound($ConstantGlobalArray, 2) -1 MsgBox(0x40000, '[' & $i & '][' & $ii & ']', $ConstantGlobalArray[$i][$ii], 2) Next Next Link to comment Share on other sites More sharing options...
Lej Posted November 28, 2006 Author Share Posted November 28, 2006 Thanks for the help Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now