function
name
(parameters)
{scope
return
optional};
statement
callfunction
(arguments);
statement/expression
Variables
nvarvariable=value;
declaration, numeric
svarvariable="value";
declaration, string
variable=variable/expression;
reassignment
spartysaysvariable/expression;
print
Operators
+,
-,
*,
/
arithmetic
==,
!=,
>,
>=,
<,
<=
comparison
and,
or,
not
logical
Comments
// comment
single line
spartan logo belongs to Michigan State University
this project is modified from a class project of CSE 450 (translation of programming languages) at MSU.