doc: remove outdated documentation from sample file
This commit is contained in:
@@ -312,29 +312,6 @@ end
|
||||
|
||||
/* equivalent 'pure' syntax */
|
||||
|
||||
/**
|
||||
this example also demonstrates how line continuations are not always
|
||||
necessary when breaking a statement up over multiple lines.
|
||||
|
||||
the compiler uses a few conditions to determine if it should continue
|
||||
parsing a particular statement past a line break:
|
||||
|
||||
1) if the next token immediately after a line break is a label.
|
||||
2) if the token immediately before a line break if a binary operator.
|
||||
3) if the line break occurs within a set of sub-expression delimiters
|
||||
(parentheses), lambda delimiters (brackets), package delimiters
|
||||
(braces), or string delimiters (single or double quotes).
|
||||
|
||||
note that if a line break is encountered in a string constant,
|
||||
the line break character is included in the string. to prevent
|
||||
this behaviour, you can precede the line break with a line continuation
|
||||
character.
|
||||
|
||||
because of the implicit line continuations provided by these conditions,
|
||||
the following statement requires no explicit line continuations to
|
||||
be correctly parsed.
|
||||
**/
|
||||
|
||||
[ v = Int parse:'342' ]
|
||||
on:#err:number_format do:[ :err :data |
|
||||
cout put:'Cannot parse integer string ({err})'
|
||||
@@ -344,16 +321,6 @@ end
|
||||
];
|
||||
call.
|
||||
|
||||
/**
|
||||
this example doesn't meet any of the conditions required for implicit
|
||||
line continuations to be inserted. because of this, it will be treated
|
||||
as four separate statements.
|
||||
|
||||
there are a few ways this could be fixed:
|
||||
|
||||
1) surrount the right-hand side of the statement with parentheses.
|
||||
2) put a line continuation character at the end of all but the last line.
|
||||
**/
|
||||
v = 5
|
||||
squared
|
||||
squared
|
||||
|
||||
Reference in New Issue
Block a user