Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

Done Way to [re]initialize an array

May
12,930
170
... regardless of dimensions ...

maybe "FILLARRAY <array_name> <string>

Also, "SETARRAY /0 ..." might initialize all entries to "0" when it's created.
 
What's wrong with unsetting and redefining it?
I don't just want to [re]define it. I want to [re]initialize it with data.

Code:
setarray [/f] /0 a[%len,2]
would be a lot easier than
Code:
setarray [/f] a[%len,2]
do i=0 to %@dec[%len] ( do j=0 to 1 ( set a[%i,%j]=0 ) )
 
  • Like
Reactions: rps
I don't use arrays that often, but when I do your suggestions would be helpful.

IMHO, this addition would also make the code easier to understood.
 
Back
Top