[Newbies] "Print specific integers" Error message, how to improve and what causes that ?
Yoshiki Ohshima
Yoshiki.Ohshima at acm.org
Fri Nov 17 03:22:08 UTC 2017
This is a part of something bigger problem/project, right? Otherwise,
you get the same results from:
| myArray |
myArray := #(2 32 44 67 89 111 123).
myArray do: [:a | Transcript show: a; cr].
or even,
#(2 32 44 67 89 111 123) do: [:a | Transcript show: a; cr].
(Why 130?)
On Thu, Nov 16, 2017 at 6:57 PM, RedTigerFish <chihuyu at gmail.com> wrote:
> *Update:*
>
> I found another way to solve this issue:
>
> |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.
> n = 7
> ifTrue: [n := n - 1].
> ].
> ].
>
>
> *Looks ugly though*
>
>
>
> -----
> Dig, dig where you are,
> Down below's well.
> Let those that walk in darkness shout,
> Down below's hell.
> --
> Sent from: http://forum.world.st/Squeak-Beginners-f107673.html
> _______________________________________________
> Beginners mailing list
> Beginners at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/mailman/listinfo/beginners
--
-- Yoshiki
More information about the Beginners
mailing list