[Newcompiler] Re: Saphir scripting language for squeak

Stéphane Ducasse stephane.ducasse at univ-savoie.fr
Sun Oct 29 05:51:53 UTC 2006


math

some remarks:
	- I guess that main is just the name of a method of the script. Is  
it the case because
	else having main is more a pain ?

We said that

foo [......]
define a script method
is it the case?

so are run [] and declare [] script methods?

Then what is the difference between run [...], declare [...] and foo  
[...]


> main [
>    self haltIf: #run
> ]
>
> declare [
> 	Object subclass: #Exemple
> 		instanceVariableNames: ''
> 		classVariableNames: ''
> 		poolDictionaries: ''
> 		category: 'SandBox'
> ]
>
> Exemple instanceSideMethodExemple [
> 	^4
> ]
>
> Exemple class classSideMethodExemple [
> 	^0
> ]
>
> run [
> 	self declare.
> 	self main.
> 	Console printNl: 'End of script'
> ]
>
>
> To run your script put it in a file then open FileList and selected  
> your script.
> You should see a "Do It" button. So click on it and this will  
> execute your script.
>
> Your script will be store in a subclass of ScriptInterpreter and  
> have the name of your file name.
>
> Now there is still plenty of works to do:
>  -Right better tests
>  -Add better declaration for class
>  -Script class
>  -Get sapphire working on the command line
>  -Recover arguments from command line
>
> Enjoy and don't forget to give us feedback
>
> Thanks
> 	Math
>
> 	
> 	
> 		
> ______________________________________________________________________ 
> _____
> 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