LICENSE
The NOOL is a public open source project of
Quésoft under the GNU General Public License. For more information
read lisence.txt.
Some class released uses the Quésoft's
C Libraries (CLib)
This program is free software; you can redistribute
it and/or modify
it under the terms of the GNU General Public License
as published by
the Free Software Foundation; either version 2 of the
License, or
(at your option) any later version.
This program is distributed in the hope that it will
be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty
of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public
License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston,
MA 02111-1307 USA
JOIN QUÉSOFT
e-mail : brown_frede@hotmail.com
REQUIREMENTS
TI-89, TI-92 II or TI-92+ calculator.
INTERPRETER
The NOOL's interpreter is a program named
"e", standing for "execute".
Here's a typical line of command :
e(objectName/staticClass,
method, arg1, arg2, arg3)
For example, the line Edit1.setCaption("allo") in java looks like e("Edit1", "setCaption", "allo", null, null) in NOOL. And the line x = Edit1.getCaption() looks like e("Edit1", "getCaption", "x", null, null).
THE APPLICATION OBJECT
This object is automaticly created when you
start the interpreter.
Methods
void run()
This method is used at the beginning of a
program.
Ex : e("Application",
"run", null, null, null)
void terminate()
This method is usually used at the end of
a program. It can be however used anywhere to terminate an application.
Ex : e("Application",
"terminate", null, null, null)
PROGRAMMING
NOOL's keywords
new
Used to create a new object.
Examples :
e("net1", "new",
"TNet", null, null) //Create a new object of
type Net(Network) named net1
e("rbtn1", "new",
"TRBtn", "net1", null) //Create a new object
of type RBtn(RadioButton) named rbtn1 that uses net1
parent
Used to use a method of the object by polymorphing
it into his parent.
Example :
e("rbtn1", "parent",
"getCaption", "temp", null) //Use the method
getCaption() of the TButton class
this
Refer to the current object.
Example :
e(this, "setVisible",
false, null, null) //Set the object visibility
to false
null
The null pointer is used to indicate that
a parameter isn't used.
A typical NOOL program :
e("Application",
"run", null, null, null)
//instructions
e("Application", "terminate", null, null, null)
Class
A typical class :
className(this,
method, arg1, arg2)
Prgm
//Methods
EndPrgm
Methods
A typical method :
If a method of the same name exist in the
parent's class it will be remplaced.
if method="methodName"
then
//Instructions
Return
endif
An over charging method :
If a method of the same name exist in the
parent's class these instructions will be added.
if method="methodName"
then
//Instructions
endif
Constructors
The constructors are the methods executed
at the creation of an object.
A typical constructor :
if method="Create"
and arg1=null then
//Instructions
Return
endif
A typical parameterized constructor :
if method="Create"
then
//Instructions
Return
endif
Object's classes
A typical object's class :
className(this,
method, arg1, arg2) //A class must be parameted
like it
Prgm
//Constructors
//Global variables
//Methods and over-charging methods (pre)
parentName(this, method, arg1, arg2)
//Methods and over-charging methods (post)
EndPrgm
EXAMPLES
The TCheckButton object's class
This class inherit from the TButton class.
It adds a "checked" property.
(this, method, arg1,
arg2) //Heading
Prgm
//
//Constructors
if method="Create"
then
[[0,0,10,10,"false",this,"false"]["TChkBtn",
"TButton",null,null,null,null,null]]»#this
Return
endif
//Global variables
#this[1,1]»xa
#this[1,2]»ya
#this[1,3]»height
#this[1,4]»width
#this[1,5]»visi
#this[1,6]»caption
#this[1,7]»chk
xa+width»xb
ya+height»yb
/*Method void setChecked(boolean)
if method="setChecked"
then
if visi="true"
then
if arg1="true"
then
if
chk="false" then
PANEL(xa, ya, xb, yb, 2) //Reverse color of
button
endif
else
if
chk="false" then
PANEL(xa, ya, xb, yb, 2) //Reverse color of
button
endif
endif
endif
arg1»#this[1,7]
//Save status in
Return
endif
//Method boolean
getChecked()
if method="getChecked"
then
chk»#arg1
Return
endif
//Over-charging
method (pre)
if method="Destroy"
then
DelVar chk
endif
TButton(this, method, arg1, arg2) //Expand class TButton
EndPrgm
The TCheckButton object's class' constructor
if method="Create"
then
x y
height width visible caption checked
[[0,0,10,
10, "false", this, "false"]
class
parent
["TChkBtn",
"TButton", null,null,null,null,null]]»#this
Return
endif