Introduction Getting Started CED Features CED Commands Index

VREPLACE command

Syntax: VREPLACE "old-variable","new-variable"[,starting-line][,end-line]

(or)

VREPLACE old-variable,new-variable[,starting-line][,end-line]

Discussion: VREPLACE finds and replaces one variable name with another variable name.

The internal search logic is very straightforward. The VREPLACE command examines the character immediately preceding and the character immediately following the specified search string. If either of those characters contains a number, letter, single quote, or double quote, the string is skipped (i.e., it's not an MTB variable name). Likewise, if the character immediately following the search string contains a dollar sign, the string is skipped. Otherwise the search could return string variable names when you were trying to find numeric variable names (A versus A$, for example).

Also see:
REPLACE
VFIND
VSEEK
VBRIGHT

Examples:
  VREPLACE "I","J"   replaces the variable named I with a variable
                     named J

  VREPLACE I,J       replaces the variable named I with a variable
                     named J

  VREPLACE A$,B$     replaces the variable named A$ with a variable
                     named B$