| Syntax Color Legend |
|---|
| Command |
| Mandatory parameter |
| Optional parameter |
| Mandatory keyword |
| Optional keyword |
REPLACE (<Destination>, <Position>, <Source>)
Replaces a part or all of the specified destination variable starting at the specified position with the contents of the source.
None
| Parameter | Description |
|---|---|
| <Destination> | The variable to replace a part of. |
| <Position> | The one based position in the destination variable from where to start the replace. |
| <Source> | Expression giving an alpha value to move into the destination variable. |
When an invalid starting position is specified (E.g. larger than the length of the destination variable), the system item RESOK will be set to False otherwise RESOK will be left unchanged.
When the length of the source is shorter than the space left in the destination variable counted from the start position the characters beyond will be left unchanged.
When the length of the source is longer than the space left in the destination variable counted from the start position the source will be truncated to match the space left.
When the source expression is a single copy function, then the length of the source will be the length specified in the copy function.
countrycode := '0031'
areacode := '524'
extension := '515386'
telno := '---------------'
replace (telno, 1, countrycode)
replace (telno, 6, areacode)
replace (telno, 10, extension)
// telno is now 0031-524-515386