Is there any set way to set a variable to an array of a certain size or a list of the same stature?
Or pretty much anything that isn't a string or number (for example, a table)
Initiate Arrays, Lists, etc.
Moderator: MSandro
Re: Initiate Arrays, Lists, etc.
You can create a fixed size Array object with ten elements like this:
If you add a third parameter, the Array is filled with that value:
Finally, you can turn an Array into a List like this:
Code: Select all
print (newArray 10)
Code: Select all
print (newArray 10 'ha!')
Code: Select all
print (toList (newArray 10 'ho!'))
Re: Initiate Arrays, Lists, etc.
Thank you again, although I don't understand why not just have a Initiate Array block?
But thanks to how you made GP it's as easy as just adding a few lines to the library and it's there so thank you for that too :D
But thanks to how you made GP it's as easy as just adding a few lines to the library and it's there so thank you for that too :D