HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

A Variable for Variables.

08-04-2007, 02:52 AM#1
MrApples
Is it possible for me to make something which would do something for a given variable array.

like..
Code:
Function( udg_Array )
08-04-2007, 03:18 AM#2
botanic
what do you mean specifically? You can do this

For each intiger A from 1-12 do
Array[Intiger A]
08-04-2007, 03:25 AM#3
Ammorth
You could stick the array inside a struct and then pass the struct. Only thing that came to mind.
08-04-2007, 03:33 AM#4
PipeDream
  • vJass has provisions for fixed size dynamic arrays
  • WeWarlock probably has support for that too
  • But it's easy to write your own stack allocator. If you don't need really need to deallocate until you need to deallocate everything, then you can just increment an integer and set it to zero when the program is finished.
  • DARY is kind of cool, but it's sort of a glass sledgehammer
  • Linked lists are really easy, particularly in vJass (or WeWarlock), but again you can do it yourself easily