Re: Simple Program Won't Run

Ludovic <[email protected]>
Newsgroups gmane.comp.lang.smalltalk.gnu.general
Message-ID <[email protected]>
Le 15/01/2021 à 18:38, Gary Highberger a écrit :
> Hi Everybody,
>
> Obviously what programming skills I have are other than Oops :-)
>
> What Oops rule(s) does the following program, autoRun,st, break? Why is MyA
> written as #MyA in the error message? Why doesn't the compiler understand
> MyA? It's defined in the immediately preceding line.
>
> Gary Highberger
>
> cat autoRun.st
> MyA := Array new: 10
> MyA at: 1 put: 'one'
> 3 printNl
> 'hello world' printNl

Hi Gary,

you forgot the end of statement marker :  the dot (".").

example:

   myArray := Array new: 10.

And an advice, you should start your variables with a lower case letter.

-- 
Ludovic
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.