nuBASIC supports old-style programs where all the statements begin with a line number or new one where line number is not needed. The first format is supported but deprecated.
nuBASIC language is compatible with modern structured programming theory by discarding the line numbers and adding the control structures and subroutine definitions needed by structured programming.
Example: Hello World Loop application which uses line numbers
Example: Hello World Loop application which uses labels
The BASIC interpreter's line-oriented execution produces one of the key differences between BASIC and other programming languages. Whereas the position of hard line breaks in the source code of Java or C++ programs is irrelevant, each line in a BASIC program forms a self-contained unit.
Function calls, mathematical expressions, and other linguistic elements, such as function and loop headers, must be completed on the same line that they begin on.
To linking individual lines you can use colons to divide one line into several sections so that there is enough space for several expressions.
For example, the assignments
can be written as follows: