[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-smalltalk] basic syntax questions

From: Paolo Bonzini
Subject: Re: [Help-smalltalk] basic syntax questions
Date: Mon, 16 Nov 2009 09:36:57 +0100

On Sat, Nov 14, 2009 at 03:24, LordGeoffrey
<address@hidden> wrote:
> Hi
> I am trying to get started with gnu-smalltalk, and i have a couple trivial
> questions.
> I can't find a sample st script that uses the [ ] delimiters rather than the
> fileOut ! version.

Almost all of the code in the GNU Smalltalk tarballs use [ ] including the

> The following code works. But if i move the definition of new into the
> definition Account init is not called. Don't know why.

You need to declare new as

   Account class >> new [

if you move it into the definition of Account.

> Also i do a snapshot at the end, is that the right approach?

Yes, that's fine.  That's not necessary (you can load the code from
the command line every time -- later on you'd want to put it in a
package so it gets a .star file, maybe), but it's fine.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]