Talk:Petit Computer 3/@comment-15296152-20140630180028

With functions, I wonder if the parameters are all ByVal (meaning that the contents of the variable sent in are copied to the new variable name) or ByRef (where the parameter variable references the original, and can therefore change it)? As for the actual parameters, will we be limited to just single variables and strings, or will it also allow arrays? It would be kinda cool if it not only allowed arrays, but allowed dimension reduction and a sense of ByRef usage. Here's what I mean...

---

DIM THISARR(10,10,10)

THISARR(9,3,5) = 6

MYFUNC(THISARR(9))

DIM MYFUNC MYARR

PRINT MYARR(3,5)

END DIM

It would print 6. I don't know how many people would find it useful, but I certainly would with how I handle data. If it were even possible, I'd even love to have localized arrays that did the same thing. It would probably be the closest thing to "pointers" as we could get with a BASIC-like language.