IB Statements/move

From CometWiki

< IB Statements
Revision as of 16:17, 10 November 2017 by Barb (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

MOVE statement

Syntax: MOVE (string-argument-1, string-argument-2, starting-position, length)

Discussion: The MOVE statement moves a specified number of characters from one string into another string, starting at a specified location in the second string.

String-argument-1 may be a string constant, a single element string variable, a string array element, a string expression or a string function.

String-argument-2 must be a string variable.

The starting position and length are numeric values. They may be numeric constants or single element numeric variables. The starting position is the position in the second string argument into which the characters from the first string argument are to be moved. The length is the number of characters to be moved.

Example: MOVE(A$,B$,2,3)

If A$ = "ABCDEFG" and B$ = "123456789", after the move operation, A$ will be "ABCDEFG" and B$ will be "1ABC56789".

Personal tools