|
|
I've gotten a rudimentary expression parser, variables, functions, and
the user output stream working. Objects can be declared, but I haven't
written the code for deriving objects from others or for accessing
members, so they aren't very useful yet.
It's not much, but it is enough for a "Hello World" program:
scalar accum = 5;
function run()
{
string Message = "Hello World!\n";
swrite(userout, Message, "pi = ", pi, newln);
swrite(userout, "Calling aFunc():", newln);
aFunc();
swrite(userout, "aFunc() returned.", newln);
};
function aFunc()
{
scalar Count = 5;
swrite(userout, "Inside aFunc():\n");
while(Count)
{
swrite(userout, "while: ", Count, newln);
swrite(userout, "accum = ", accum, newln);
Count = Count - 1;
accum = accum + 1;
};
};
--
--
Christopher James Huff <chr### [at] maccom>
Post a reply to this message
|
|