MID$ Statement ---------------------------------------------------------------------------- Action Replaces a portion of a string variable with another string. Syntax MID$( stringvariable$, start% , length%) = stringexpression$ Remarks The MID$ statement uses the following arguments. ----------------------------------------------------------------------------- Argument Description Argument Description ---------------------------------------------------------------------------- stringvariable$ The string variable being modified. start% A numeric expression giving the position in stringvariable$ where the replacement starts. length% A numeric expression that gives the length of the string being replaced. stringexpression$ The string expression that replaces part of stringvariable$. The arguments start% and length% are integer expressions. The argument stringvariable$ is a string variable, but stringexpression$ can be a string variable, a string constant, or a string expression. The optional length% refers to the number of characters from the argument stringexpression$ that are used in the replacement. If length% is omitted, all of stringexpression$ is used. However, regardless of whether length% is omitted or included, the replacement of characters never goes beyond the original length of stringvariable$. See Also MID$ Function Example This example uses the MID$ statement to replace string characters. CLS' Clear screen. Test$ = "Paris, France" PRINT Test$ MID$(Test$, 8)="Texas "' Starting at position 8, replace ' characters in Test$ with Texas. PRINT Test$ Output Paris, France Paris, Texas