Syntax Diagrams/text/sbasic/shared/conventions.xhpSyntax diagrams; How to readStatements syntax;How to readTypographical conventions
How to Read Syntax Diagrams and Statements
%PRODUCTNAME Basic statements use syntax diagrams and textual conventions that follow these typographical rules:%PRODUCTNAME Basic keywords or functions use proper casing: Call, DimArray, InputBox, Property.Lowercase characters indicate information to supply: end, expression, start, variable.The syntax of a %PRODUCTNAME Basic one line statement is illustrated herewith:
Diagram example
Basic statement diagrams start and end with double vertical bars,Loops indicate a possible repetition, an optional separator may be present,Rectangles denote subsequent diagram fragments,Diagram fragments extremities exhibit single vertical bars.syntax of a statementA set of %PRODUCTNAME Basic statements - with optional labels - is using a colon : sign to separate them, it can be terminated with an optional comment. REM or an apostrophe sign introduce a comment.diagram fragment
Textual example
[opt1|opt2|opt3] Items inside brackets are optional, alternatives are indicated with a vertical bar,case[[sep]…] An ellipsis indicates a possible repetition, an optional separator may be specified,{choice1|choice2} Items inside curly braces are compulsory, alternatives are indicated with a vertical bar.[ [label:] statement [: …] ] [{REM|'} text]A set of %PRODUCTNAME Basic statements - with optional labels - is using a colon : sign to separate them, it can be terminated with an optional comment. REM or an apostrophe sign introduce a comment.Sub Main GoTo there ' skip first statement here: Print 1, : there: Print 2 REM explanatory text hereEnd Sub