merge
Type
function
Summary
Evaluates any expressions in a string, replaces them with their value, and returns the transformed string.
Syntax
merge(<stringToEvaluate>)
Description
The merge function Evaluates any expressions in double square brackets, and replaces them with the expression's value.
It also executes any return statements enclosed in "<?" and "?>", and replaces them by the value returned.
Parameters
| Name | Type | Description | 
|---|---|---|
stringToEvaluate  | string  | A string of any length, which may include expressions enclosed in double square brackets ([[expression]]) and return statements enclosed in "?" and "?" (?return expression?).  | 
Examples
merge("1+1 equals [[1+1]]") -- returns "1+1 equals 2"
merge("The current folder is [[the defaultFolder]]")
Value
| Name | Type | Description | 
|---|---|---|
return  | ||
the result  | Use the merge function to combine text with the result of evaluating expressions in a single string.  | 
Related
control structure: return, function
function: value
glossary: statement, evaluate, return, expression
keyword: string
Compatibility and Support
Introduced
LiveCode 1.1
OS
mac
windows
linux
ios
android
Platforms
desktop
server
mobile