arrays in function arguments
Displaying 1-4 of 4 total.
1
basil
|
Am I correct in thinking arrays cannot be used as a function argument?
e.g.
int beef[10];
erase(beef);
Is there any relatively elegant way around this?
Posted on 2004-07-15 22:09:21
|
rpgking
|
There is no call-by-reference stuff like that in Verge3...
But strings in Verge3 can be of almost any length, and it has great string tokenizer functions... So, you could basically imitate a dynamic array using a string list, and pass that string into the function.
I don't know how performance would be affected though if you use strings.
Posted on 2004-07-15 22:14:22
|
Gayo
|
It would be affected a lot, I am guessing. You're basically fucked if you want to pass by reference. I've heard tell that this may be amended someday in the future, but the functionality may not extend to arrays.
Posted on 2004-07-16 01:21:32
|
mcgrue
|
I'm not sure if vecna's put the get/set-by-name functions for arrays yet.
Posted on 2004-07-16 02:21:27
|