On Thursday, November 16, 2017, 3:19:49 AM EST, RedTigerFish <chihuyu@gmail.com> wrote:
Hello, *what I want is:*
From integers 1 to 130, I want to print some specific integers already given
in an array.
They are: 2 32 44 67 89 111 123 which are stored in small-to-big order.
*Here's my codes:*
|a n myArray|
myArray := #(2 32 44 67 89 111 123).
n := 1.
a := myArray at: n.
1 to: 130 do: [:i|
i = a
ifTrue: [
Transcript show: i; cr.
n := n + 1.
a := myArray at: n.
].
].
The output is very good except for an Error Message.
By my current level, I have no idea why that Error Message appears.
Q1: Why Error Message appears ?
Q2: How can I improve that?
-----
Dig, dig where you are,
Down below's well.
Let those that walk in darkness shout,
Down below's hell.
--
_______________________________________________
Beginners mailing list