Futurebasic/Language/Reference/MID statement

Revised
May 30, 2000 (Release 3)

Description
This statement updates  (which must be a string variable) or  (a container variable), deleting a subpart from  or   and replacing it with an equal number of characters from the left side of. The subpart to be replaced begins at position  within  or. In the following code fragments, containers and strings work the same. The number of characters replaced equals the smallest of these quantities:

 

Under the following circumstances,  does nothing:

 When  or   is empty;

When  is less than 1 or greater than  ;

When  is less than 1.

 Note: You may not use complex expressions that include containers on the right side of the equal sign.

Example: