Can't find how to put multiple statements on a single line

Forum for discussion about the documentation project.
Post Reply
eekee
Posts: 5
Joined: Oct 24, 2021 17:50

Can't find how to put multiple statements on a single line

Post by eekee »

In FreeBASIC's wiki, I can't easily find how to put multiple statements on a single line. I've found out for myself by booting up my DOS machine and looking in QBasic's help system, (the separator is a colon,) but I thought this is a documentation bug; it ought to be as easy to find as the line continuation character. I can't see anything in the manual's table of contents or the Programmer's Guide which tells me what the separator character is.

I guess I'd put it in the Programmer's Guide under Lexical Conventions, (the same section as line continuation,) but I'm not sure what to call the page, and I'm going to need to be a bit more awake to write it. Any suggestions? (QBasic's help is no use here, it puts it on a "Basic character set" page which is an eclectic mix of single-character things.)
fxm
Moderator
Posts: 12081
Joined: Apr 22, 2009 12:46
Location: Paris suburbs, FRANCE

Re: Can't find how to put multiple statements on a single line

Post by fxm »

I wrote something in the Programmer's Guide / Statements and Expressions / Differences between Expressions and Statements:
Statements normally take up a single line with no terminator. Statements can be stacked by using a colon (:) to separate them.
If a statement is very long, it may be continued to the next line using the continuation character, an underscore (_).
I could also add something similar to the above as a preamble in the Programmer's Guide / Statements and Expressions / Line continuation page.

[edit]
Done:
- ProPgLineContinuation → fxm [added sentence on colon character (:) to separate statements]
Last edited by fxm on Oct 27, 2021 5:01, edited 1 time in total.
Reason: Update.
fxm
Moderator
Posts: 12081
Joined: Apr 22, 2009 12:46
Location: Paris suburbs, FRANCE

Re: Can't find how to put multiple statements on a single line

Post by fxm »

fxm wrote:I wrote something in the Programmer's Guide / Statements and Expressions / Differences between Expressions and Statements:
Statements normally take up a single line with no terminator. Statements can be stacked by using a colon (:) to separate them.
If a statement is very long, it may be continued to the next line using the continuation character, an underscore (_).
I could also add something similar to the above as a preamble in the Programmer's Guide / Statements and Expressions / Line continuation page.

[edit]
Done:
- ProPgLineContinuation → fxm [added sentence on colon character (:) to separate statements]
In fact, I have now created in the Programmer's Guide / Lexical Conventions a new very short 'Line Separator' page below 'Line Continuation', with links between them:
- ProPgLineSeparator → fxm [new page 'Line Separator']
- ProPgLineContinuation → fxm [added link to 'Line Separator']
- CatPgProgrammer → fxm [added link to 'Line Separator']
- PrintToc → fxm [added link to 'Line Separator']
- ProPgExpressionsStatements → fxm [wording]
Post Reply