Re: Simple Program Won't Run

Jan Vrany <[email protected]>
Newsgroups gmane.comp.lang.smalltalk.gnu.general
Message-ID <[email protected]>


On Fri, 2021-01-15 at 22:56 -0500, Gary Highberger wrote:
> Hi Help-Smalltalk,
> 
> I put periods after each line and then the Smalltalk program ran just
> fine.
> Is there a way to avoid having to put periods after each line? What
> end of
> statement characters besides period does Smalltalk expect? Maybe my
> editor
> can be reconfigured accordingly.
> 
. (dot) is (the only) statement separator, i.e, two statements must be 
separated by . (dot). Otherwise, you get either syntax error or DNU. 

HTH, Jan

> Thanks everyone,
> Gary
> 
> 
> On Fri, Jan 15, 2021, 12:38 PM Gary Highberger <
> [email protected]>
> wrote:
> 
> > 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
> > 
> > $ gst autoRun.st
> > Object: 10 error: did not understand #MyA
> > MessageNotUnderstood(Exception)>>signal (ExcHandling.st:254)
> > SmallInteger(Object)>>doesNotUnderstand: #MyA (SysExcept.st:1448)
> > UndefinedObject>>executeStatements (autoRun.st:1)
> > 3
> > 'hello world'
> > $
> > 
> >
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.