Skip to content

Latest commit

 

History

History
35 lines (32 loc) · 2.47 KB

Syntax.org

File metadata and controls

35 lines (32 loc) · 2.47 KB

Notation for Syntax

Syntax conventions used in this guide:

NotationMeaningSyntax exampleSample entry
UppercaseKeyword; enter as shownPRINTPRINT
Lowercase parameterParameter name; substitute a valuePRINT valuePRINT "Text"​
OUT keywordenter as shown (return values follow)BACKCOLOR OUT color%BACKCOLOR OUT C
% parameter suffixInteger type parameterCHR$ code% OUT char$C$ = CHR$(65)
# parameter suffixReal type parameterRAD angle# OUT radiansA = RAD(73.22)
$ parameter suffixString type parameterVAL numeric_string$ OUT valueN = VAL("100")
@ label notationLabel; substitute label identifierGOTO @<label>GOTO @LOOP
[] parameter suffixArray parameterLEN array[] OUT length%DIM A[2]:L=LEN(A)
? parameter suffixNullable parameter; optional useLOCATE x%?, y%?LOCATE ,14
CommaSeparator; enter as shownPOW base, exponent OUT powerN = POW(2,8)
Enclosing bracketsOptional parameter(s)PRINT [value[, value]]PRINT 1
EllipsisList; repeat numbered itemMAX num_1, num_2 [, ...] OUT maxN = MAX(1,2,3,4,5)
Or-bar (|)Mutual exclusion; enter one as shownOPTION STRICT|DEFINTOPTION DEFINT
Angle bracketsIdentifier; substitute legal identifierDEF <identifier>DEF COOL_FUNCTION

“Enter as shown” means to enter the letters shown; SmileBASIC is not case-sensitive.

For Contributors

(github sucks edition) Set source block code language to haskell for helpful highlighting

#+BEGIN_SRC haskell
LOCATE x%?, y%? [, z%]
GPUTCHR x%, y%, string$ [, scale_x%, scale_y%] [, color%]
#+END_SRC
LOCATE x%?, y%? [, z%]
GPUTCHR x%, y%, string$ [, scale_x%, scale_y%] [, color%]