Hitachi

JP1 Version 11 JP1/Script Description and Reference (For Windows Systems)


8.3.15 &= operator (concatenate strings)

Purpose

Performs string concatenation on a variable and an expression, and assigns the result to the variable.

Syntax
Result &= Expression
Arguments
Result

Specify a variable for storing the result.

Expression

Write any expression.

Description

The &= operator performs string concatenation on the assumption that values of Result and Expression are all strings.

If both values are Empty, an Empty value is assigned to Result. If Result is an Empty value or undefined, the value of Expression is assigned as is to Result. If Expression is an Empty value, Result remains unchanged.

Examples
' This code stores "ABCDEF" in variable result1.
result1 = "ABC"
result1 &= "DEF"
 
' This code stores "01" in variable result2.
result2 = 0
result2 &= 1
 
' This code stores "100" in variable result3.
Dim result3
result3 &= 100
JP1/Script version

Supported from JP1/Script 06-51.