NoPoint Esolang Syntax Documentation
1. Variable Declarations
Integer/Double:
integer varname EQUALS <expression> END double varname EQUALS <expression> END
<expression> can be a number, math operation, or a special calculation (see below).
Example:
integer x EQUALS 5 END double y EQUALS x PLUS 3 END
String:
string varname QUOTE <text> QUOTE
Example:
string greeting QUOTE Hello World QUOTE
2. Constants
Predefined constants:PI, EULER, TAU, INFINITY, NEGATIVEINFINITY, SQRT2, SQRT3, DEGREESTORADIANS, NOTANUMBER, TRUE, FALSE
3. Volume and Area Calculations
Volume:
VOLUME <shape> <arg1> <arg2> <arg3> <unit>
Shapes: CUBE, SPHERE, CYLINDER, PYRAMID
Example:
integer v EQUALS VOLUME CUBE 2 2 2 METERS END
Area:
AREA <shape> <arg1> <arg2> <unit>
Shapes: RECTANGLE, SQUARE, TRIANGLE, CIRCLE, TRAPEZOID
Example:
double a EQUALS AREA RECTANGLE 3 4 METERS END
4. Functions
Definition:
function <name>
<body lines, indented>
<name> SEMICOLONExample:
function main
integer x EQUALS 5 END
PRINT x END
main SEMICOLONCalling a function:
<name> SEMICOLON
5. Printing
Print string:
PRINT QUOTE <text> QUOTE
Print variable:
PRINT <varname> END
Print calculation:
PRINT VOLUME <shape> <args> <unit> END PRINT AREA <shape> <args> <unit> END
Print expression:
PRINT <expression> END
6. Boolean Checks
Does:
DOES <left> <operator> <right> END
Operators: EQUALS, NOTEQUALS, GREATER, LESS
Returns: TRUE (1) or FALSE (0)
Example:
DOES x GREATER 5 END
7. Math Expressions
Supported operators in expressions:
- PLUS
- SUBTRACT
- MULTIPLY
- DIVIDE
- POWER
- MOD
- SQRT
Example:
integer z EQUALS x MULTIPLY 2 END
8. Miscellaneous
- SPACE: Prints a blank line.
- COMMENT: No operation (ignored).
- SEMICOLON: Used to mark the end of a function or to call a function.
9. Units
Supported units for area/volume: MILLIMETERS, CENTIMETERS, METERS, INCHES, FEET
Units are suffixed with their exponent (e.g., m^2 for area, m^3 for volume).
