[Newcompiler] Re: Saphir scripting language for squeak
Mathieu Suen
mathieusuen at yahoo.fr
Sun Oct 29 08:34:15 UTC 2006
stephane ducasse a écrit :
> I do not understand what you are trying to say.
>
>>>>> Then what is the difference between run [...], declare [...] and foo
>>>>> [...]
>>>>
>>>> There is no diffrence and run will be automaticly called
>>>>
>>> I think that there is a definition since declare and run do not compile
>>> a method
>>> at leats from ther user point of view
>
> What does declare?
declare is just a method and you can call it with "self declare"
>
> What does foo [ ]
Is also a method same as declare
>
> what does run [ ]
run is the method that are call when you lunch your script
>
> There is a difference between implementation and semantics.
>
No, implementation make no diffrence bettwen those methods
Here the grammar of a script method:
ScriptMethod:
MethodPattern "[" MethodCore "]"
>
>
>> Yes there is a grammar rule. Is that you mean?
>>
>> run and declare are compile method in a subclass of ScriptInterpreter.
>> You can try to run the attach
>> file and you will see a new class called Exemple1
>>
>> Math
>> #!/bin/sh
>> run [
>> Transcript show: 'Hello!'
>> ]
>
>
___________________________________________________________________________
Découvrez une nouvelle façon d'obtenir des réponses à toutes vos questions !
Profitez des connaissances, des opinions et des expériences des internautes sur Yahoo! Questions/Réponses
http://fr.answers.yahoo.com
More information about the Newcompiler
mailing list