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

#1 2011-02-11 07:34:40

SeptimusHeap
Scratcher
Registered: 2010-02-01
Posts: 1000+

Batch Lists?

How would I add and remove items to a list? They're created like this, right?

Code:

list=[item1 item2 item3]

Please help me!


http://i46.tinypic.com/dw7zft.png

Offline

 

#2 2011-02-11 10:26:14

poopo
Scratcher
Registered: 2009-09-20
Posts: 1000+

Re: Batch Lists?

I don't know squeak but I'm guess from other programming experiances you need to do this:

List = ["this", "is", "a", "list"]

And then to call upon them you need to do

List(3) or List[3]

If that works it would give you the 4th thing on the list therefor  "list"


http://i45.tinypic.com/28rnqki.jpg

Offline

 

#3 2011-02-11 10:27:51

technoguyx
Scratcher
Registered: 2008-10-18
Posts: 1000+

Re: Batch Lists?

poopo wrote:

I don't know squeak but I'm guess from other programming experiances you need to do this:

List = ["this", "is", "a", "list"]

And then to call upon them you need to do

List(3) or List[3]

If that works it would give you the 4th thing on the list therefor  "list"

It's not squeak, it's batch. The language you use to make .bat files on Windows.  wink


http://getgnulinux.org/links/en/linuxliberated_4_78x116.png

Offline

 

#4 2011-02-11 10:28:01

SeptimusHeap
Scratcher
Registered: 2010-02-01
Posts: 1000+

Re: Batch Lists?

poopo wrote:

I don't know squeak but I'm guess from other programming experiances you need to do this:

List = ["this", "is", "a", "list"]

And then to call upon them you need to do

List(3) or List[3]

If that works it would give you the 4th thing on the list therefor  "list"

A) I'm talking about batch, not squeak, and rarely languages use the exact same syntax for list making.

B) I want to find out how to ADD an item to the list, not call.


http://i46.tinypic.com/dw7zft.png

Offline

 

#5 2011-02-11 10:30:52

poopo
Scratcher
Registered: 2009-09-20
Posts: 1000+

Re: Batch Lists?

technoguyx wrote:

poopo wrote:

I don't know squeak but I'm guess from other programming experiances you need to do this:

List = ["this", "is", "a", "list"]

And then to call upon them you need to do

List(3) or List[3]

If that works it would give you the 4th thing on the list therefor  "list"

It's not squeak, it's batch. The language you use to make .bat files on Windows.  wink

Oh darn sorry. -_-'


http://i45.tinypic.com/28rnqki.jpg

Offline

 

#6 2011-02-12 07:28:13

SeptimusHeap
Scratcher
Registered: 2010-02-01
Posts: 1000+

Re: Batch Lists?

Bump.


http://i46.tinypic.com/dw7zft.png

Offline

 

#7 2011-02-12 11:25:01

SeptimusHeap
Scratcher
Registered: 2010-02-01
Posts: 1000+

Re: Batch Lists?

Bump.


http://i46.tinypic.com/dw7zft.png

Offline

 

Board footer