Avoid this problem by placing parentheses around the entire phrase that includes an operator.
The parentheses clear up Lingo's confusion by changing the precedence by which Lingo deals
with the operator, causing Lingo to treat the two parts of the argument as one complete
argument.
Example
This statement concatenates the strings "abra" and "cadabra" and displays the resulting string in
the Message window:
-- Lingo syntax
put("abra" & "cadabra")
// JavaScript syntax
put("abra" + "cadabra");
The result is the string "abracadabra".
This statement concatenates the strings "$" and the content of the
assigns the concatenated string to the Price field cast member:
-- Lingo syntax
member("Price").text = "$" & price
// JavaScript syntax
member("Price").text = "$" + price;
&&, + (concatenation operator)
Usage
-- Lingo syntax
expression1 && expression2
// JavaScript syntax
expression1 + expression2
Description
String operator; concatenates two expressions, inserting a space character between the original
string expressions. If either
string. The resulting expression is a string.
This is a string operator with a precedence level of 2.
Example
This statement concatenates the strings "abra" and "cadabra" and inserts a space between the two:
-- Lingo syntax
put("abra" && "cadabra")
// JavaScript syntax
put("abra " + "cadabra");
The result is the string "abra cadabra".
or
expression1
expression2
variable and then
price
is a number, it is first converted to a
&&, + (concatenation operator)
599
Need help?
Do you have a question about the DIRECTOR MX 2004-DIRECTOR SCRIPTING and is the answer not in the manual?
Questions and answers