This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2009-10-29 15:55:46

Locomule
Scratcher
Registered: 2009-08-24
Posts: 500+

Is there a way to do arrays? sorry, I am new

As in (plz pardon the pseudo code lol)...

Set variable A to 0
Loop 10 times {
  variable A = A+1
  Set variable X(A) to User Input (or whatever)
  }
Say "The first input was " X1
Say "The second input was " X2

etc

I'm fairly sure there are no native array functions but I wondered if anyone had figured out a way to "fake" it? And I don't mean an array as in just for user input but for computed data, etc. TIA


aka Pain from DragonSpires, Delrith Online, BotBattle, Urban Dead etc etc lol

Offline

 

#2 2009-10-29 16:04:44

demosthenes
Retired Community Moderator
Registered: 2008-02-19
Posts: 1000+

Re: Is there a way to do arrays? sorry, I am new

You can use lists from the variable tab.

Last edited by demosthenes (2009-10-29 16:04:59)


I've taken a long hiatus, but I still visit sometimes. Give me some time to answer any messages you post on my projects!

Offline

 

#3 2009-10-29 17:25:12

Locomule
Scratcher
Registered: 2009-08-24
Posts: 500+

Re: Is there a way to do arrays? sorry, I am new

(flashes standard noob grin) Thanks!


aka Pain from DragonSpires, Delrith Online, BotBattle, Urban Dead etc etc lol

Offline

 

Board footer