& Operator
makes a new string by concatenation.
Syntax
expression_1 & expression_2
Parts
expression_1
- An expression with a data type that can widen to
String
. expression_2
- An expression with a data type that can widen to
String
.
Result
The result is a new value of String
.
Instructions
If expression_1
or expression_2
is not of type String
, but can become a string, then the expression changes automatically.
If an expression cannot become a string, then ViviFire gives an error.
A null reference (#Null
) becomes the string "NULL"
.
We recommend that you put spaces before and after “&
”.
It is possible that ViviFire could incorrectly read “&
” as part of an integer literal.
Examples
greeting$ = "Hello," & " world!"
number$ = 4 & 2
Variable | Value |
---|---|
greeting$ |
"Hello, world!" |
number$ |
"42" |