Please enable JavaScript to view this site.

ESL Documentation

Action Statement

Append one or more string values to a string variable.

append VALUE1 [VALUE2] ... to STRING_VAR_NAME

VALUE1

VALUE2

Any values.

STRING_VAR_NAME

The identifier for a string variable.

Description

When you use this statement, the new value or values are appended to any existing contents of the specified string variable.

You can append text lines, a text segment, or a text block from a textual region to a variable. You cannot append values to an array element.

If you specify a value of a different type, ESL will try to convert the value to the expected type. (See "Type Conversions.")

If the program is compiled with External Strings, then any string literals used in this statement will be externalized.

Example

 

response to Plus5_PB

 append ".05" to Dollars

 

response to line "Full" from Host

 append "Full" to Status

 string variable City_SV

 State_SV

 ZipCode_SV

 FullAddress_SV

 

response to SendAddress_PB

 copy City ", " State_SV to FullAddress_SV

 append " " ZipCode_SV to FullAddr_SV

 ...

 copy " NY FL" to StateList_SV

 ...

 action MoreLocs is                         #StateList is now:

         append " MA" to StateList_SV         # NY FL MA

See Also

lengthof Special Inquiry Built-in Function

variable Definition