Data, defdata etc question

Monkey Archive Forums/Monkey Discussion/Data, defdata etc question

EdzUp(Posted 2012) [#1]
is it possible to have data in monkey or something similar, in C you could do things like:
int MyArray:Info[] = { 0, 3, 4, 5, 2, 1 };

the reason I ask as I am working on a program that has lots of data and I wanted to include it in the source somehow BUT there is no data statements that I could find.


Jesse(Posted 2012) [#2]
That works. It works for one dimension and multiple dimensions.

[edit]

this is how I have the map data in my SURVIBALL game:
		  mazes = New String[10][]
		  mazes[0]=["L######################R",
					"#__________oooooooo____#",
					"#_S!!o!!___oooooooo____#",
					"#____!!o!!_______oooo__#",
					"#____!!o!!__##_____oo__#",
					"#____!!o!!#p..n____oo__#",
					"#___!!o!!_#....#____oo_#",
					"#___!!o!!_#....#____oo_#",
					"#___!!o!!_#....#____oo_#",
					"#___!!o!!__r..l_____oo_#",
					"#____!!o!!__##______oo_#",
					"#______!!o!!________oo_#",
					"#________!!o!!____!ooE_#",
					"#__________!!o!o!o!!___#",
					"N######################P",
					"@15@ Intro - @"]
					
		  mazes[1]=["L##############R",
					"#___#___ooo____#",
					"#_S_#__E__oo___#",
					"#oo_#______oo__#",
					"#oo_#_______oo_#",
					"#oo_########_oo#",
					"#ooo#......#__o#",
					"#ooo#......#__o#",
					"#ooo#......#__o#",
					"#oo_########_o_#",
					"#_oo________oo_#",
					"#__oooooooooo__#",
					"N##############P",
					"@7@ Enter The Maze - @"]



and you can also do it like this:
local a:int[][] =[[1,2,3,4],[4,5,6,7],[9,9,9,9,9,9,9,9,9,9,9,9,9,9,9],[11,24,20,18]]



EdzUp(Posted 2012) [#3]
Ah thanks Jesse, will try that :D