Data editing > Writing in the Quantum language > Continuation
 
Continuation
A Quantum statement can be continued over several lines by starting the second and subsequent lines with + or ++, depending on where the statement is split.
Splitting a statement between keywords
Use + (single plus sign) when the statement is split between keywords. This assumes that a semicolon appears at the end of each continued line, whether or not there is actually one there. Take the statement:
if (c132'12'.and.t5.gt.50) write $t5 incorrect$; else; write ofil
This could be split in three places with a single plus sign for a continuation:
if (c132'12'.and.t5.gt.50)
+write $t5 incorrect$
+else
+write ofil
This example omits the semicolons at the end of each line, but it would not be wrong to leave them in.
Internal continuation of long statements
++ (double plus sign) introduces an internal continuation of a long statement over several lines. Statements may be split between lexics; that is, between keywords, conditions, lists of numbers, and so on, but not in the middle of any of these. In the previous example, you could write:
if (c132'12'.and.
++t5.gt.50) write $t5 incorrect$; else; write ofil
++ (double plus) is needed here because in this expression, one parameter is dependent on the other. The statement on the first line means nothing on its own, neither does the second line, hence the ++. The expression could also be split before the .and. or before or after the .gt..
To split it between t and 5, or in any other similar place, is incorrect because the two characters by themselves do not mean anything.
Note There is no limit to the number of consecutive continuations of either type.
See also
Writing in the Quantum language