Hello,
I have to make my own method but when I enter this: testShout self.assert: ( 'Do not panic' shout = "DO NO PANIC") The editor makes this : testShout self. Nothing more expected ->assert: ( 'Do not panic' shout = "DO NO PANIC") And I do not get a message that shout does not exist. Roelof |
you are using a dot:
self DOT assert: is wrong syntax. you need just a space: self assert: Esteban On 30 Mar 2014, at 11:26, Roelof Wobben <[hidden email]> wrote: > Hello, > > I have to make my own method but when I enter this: > > testShout > self.assert: ( 'Do not panic' shout = "DO NO PANIC") > > The editor makes this : > > testShout > self. Nothing more expected ->assert: ( 'Do not panic' shout = "DO NO PANIC") > > And I do not get a message that shout does not exist. > > Roelof > > |
Esteban Lorenzano schreef op 30-3-2014 16:31:
> you are using a dot: > > self DOT assert: is wrong syntax. > > you need just a space: > > self assert: > > Esteban > > On 30 Mar 2014, at 11:26, Roelof Wobben <[hidden email]> wrote: > >> Hello, >> >> I have to make my own method but when I enter this: >> >> testShout >> self.assert: ( 'Do not panic' shout = "DO NO PANIC") >> >> The editor makes this : >> >> testShout >> self. Nothing more expected ->assert: ( 'Do not panic' shout = "DO NO PANIC") >> >> And I do not get a message that shout does not exist. >> >> Roelof >> >> > > Thanks, it worked, Now a problem with the arrow above. According to the manual I have to type ^). But then I see the same error message as above. Roelof |
In reply to this post by Roelof
2014-03-30 15:26 GMT+01:00 Roelof Wobben <[hidden email]>:
There are some things wrong with the second line:
To write the return operator, ^, I can use one of these two combinations in my linux box (which has a slightly weird US international keyboard layout):
As an additional note, you don´t actually need the parentheses there, because the order of evaluation is:
So you can write:
testShout
Hope this helps in getting a better grasp of Smalltalk syntax. I found it really easy and fun to learn :)
Cheers, Sergi |
In reply to this post by Roelof
Roelof Wobben wrote:
> Esteban Lorenzano schreef op 30-3-2014 16:31: >> you are using a dot: >> >> self DOT assert: is wrong syntax. >> >> you need just a space: >> >> self assert: >> >> Esteban >> >> On 30 Mar 2014, at 11:26, Roelof Wobben <[hidden email]> wrote: >> >>> Hello, >>> >>> I have to make my own method but when I enter this: >>> >>> testShout >>> self.assert: ( 'Do not panic' shout = "DO NO PANIC") >>> >>> The editor makes this : >>> >>> testShout >>> self. Nothing more expected ->assert: ( 'Do not panic' shout = "DO >>> NO PANIC") >>> >>> And I do not get a message that shout does not exist. >>> >>> Roelof >>> >>> >> >> > > Thanks, > it worked, > Now a problem with the arrow above. > According to the manual I have to type ^). > But then I see the same error message as above. > > Roelof > > number from PBE. Otherwise its shooting in the dark trying to guess what you need. cheers -ben *except I'm off to bed right now - but I'm sure that with that info someone else can chime in. |
Free forum by Nabble | Edit this page |