NoPoint Esolang Example Programs
This section provides example programs for the NoPoint esolang, demonstrating its syntax and features. Each example is annotated for clarity and includes additional cases beyond the reference file.
1. Basic Program Structure
function main SEMICOLON
integer a EQUALS 2 END
integer b EQUALS 3 END
double pi EQUALS 3.14 END
string msg EQUALS QUOTE Starting program... QUOTE END
PRINT msg END
PRINT a PLUS b END
PRINT pi END
callMath SEMICOLON
callString SEMICOLON
callNested SEMICOLON
SPACE
main SEMICOLON2. Math Operations
function callMath SEMICOLON
integer x EQUALS 10 END
integer y EQUALS 4 END
string msg EQUALS QUOTE This is a math test! QUOTE END
PRINT x SUBTRACT y END
PRINT x MULTIPLY y END
PRINT x DIVIDE y END
PRINT msg MULTIPLY y END
PRINT QUOTE YOU CAN DO THAT ^ !?!?!?!??!!? QUOTE END
callMath SEMICOLONAdditional Example
function advancedMath SEMICOLON
double root EQUALS 16 SQRT END
PRINT root END
integer modTest EQUALS 10 MOD 3 END
PRINT modTest END
advancedMath SEMICOLON3. String Operations
function callString SEMICOLON
string greet EQUALS QUOTE Hello QUOTE END
string target EQUALS QUOTE NoPoint! QUOTE END
PRINT greet END
PRINT target END
SPACE
callString SEMICOLONAdditional Example
function concatString SEMICOLON
string part1 EQUALS QUOTE No QUOTE END
string part2 EQUALS QUOTE Point QUOTE END
PRINT part1 END
PRINT part2 END
concatString SEMICOLON4. Nested Functions
function callNested SEMICOLON
string intro EQUALS QUOTE Calling subfunction... QUOTE END
PRINT intro END
subPrint SEMICOLON
callNested SEMICOLON
function subPrint SEMICOLON
string echo EQUALS QUOTE I am inside subPrint! QUOTE END
PRINT echo END
subPrint SEMICOLON5. Boolean and Comparison Operations
function doescheck SEMICOLON
integer a EQUALS 5 END
integer b EQUALS 5 END
integer c EQUALS 7 END
PRINT QUOTE Checking if a EQUALS b: QUOTE END
DOES a EQUALS b END
PRINT QUOTE Checking if a EQUALS c: QUOTE END
DOES a EQUALS c END
PRINT QUOTE Checking if c GREATER b: QUOTE END
DOES c GREATER b END
double d EQUALS 10 POWER 2.2 END
PRINT d END
doescheck SEMICOLONAdditional Example
function compareTest SEMICOLON
integer x EQUALS 8 END
integer y EQUALS 3 END
PRINT QUOTE Is x LESS y? QUOTE END
DOES x LESS y END
compareTest SEMICOLON6. Volume and Area Calculations
function storeVolume SEMICOLON
PRINT VOLUME CUBE 5 5 5 METERS END
storeVolume SEMICOLON
function storeArea SEMICOLON
PRINT AREA RECTANGLE 5 10 METERS END
storeArea SEMICOLONAdditional Example
function moreGeometry SEMICOLON
PRINT VOLUME SPHERE 3 METERS END
PRINT AREA CIRCLE 7 METERS END
moreGeometry SEMICOLON7. Miscellaneous
SPACE COMMENT This is a comment END
8. Full Program Example
function main SEMICOLON
integer a EQUALS 2 END
integer b EQUALS 3 END
double pi EQUALS 3.14 END
string msg EQUALS QUOTE Starting program... QUOTE END
PRINT msg END
PRINT a PLUS b END
PRINT pi END
callMath SEMICOLON
callString SEMICOLON
callNested SEMICOLON
doescheck SEMICOLON
storeVolume SEMICOLON
storeArea SEMICOLON
moreGeometry SEMICOLON
SPACE
main SEMICOLONThese examples demonstrate the main features and syntax of the NoPoint esolang. You can mix and match these constructs to build more complex programs!
