IB Statements/move

From CometWiki

< IB Statements(Difference between revisions)
Jump to: navigation, search
(New page: '''MOVE statement''' '''Syntax:''' MOVE (string-argument-1, string-argument-2, starting-position, length) '''Discussion:''' The MOVE statement moves a specified number of characters...)
 
Line 9: Line 9:
String-argument-2 must be a string variable.  
String-argument-2 must be a string variable.  
-
The starting position and length are numeric values. They may be numeric constants, single element numeric variables, numeric array elements, numeric expressions, or numeric functions. 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.  
+
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)
'''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".
If A$ = "ABCDEFG" and B$ = "123456789", after the move operation, A$ will be "ABCDEFG" and B$ will be "1ABC56789".

Latest revision as of 16:17, 10 November 2017

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