Implicit concatenation: Difference between revisions

From m204wiki
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
Line 7: Line 7:


<var>With</var> is still required before field names:
<var>With</var> is still required before field names:
<p class="code">%foo = '>>' with field name </p>                                     
<p class="code">%foo = '>>' with FIELD NAME</p>                                     
                                                                          
                                                                          
And <var>With</var> is still required before expressions in parentheses:
And <var>With</var> is still required before expressions in parentheses:

Revision as of 20:58, 5 December 2011

This feature is new in version 7.9 of the Sirius Mods.

Implicit concatenation eliminates the need to precede User Language variables (including methods chained off a variable) and literals with the operator With to indicate concatenation. For example, the following statement sets %foo to the contents of %test enclosed within parentheses:

%foo = "(" %test ")"

If %nal is a Named Arraylist of String, implicit concatenation lets you assign to %foo the single-quoted value of item %x +1:

%foo = "'" %nal(%x + 1) "'"

With is still required before field names:

%foo = '>>' with FIELD NAME

And With is still required before expressions in parentheses:

%foo = '>>' with (%x + 2)