MID()
Action

The MID function returns part of a string (a substring).

The MID statement replaces part of a string variable with another string.

Syntax

var = MID(var1 ,st [, l] )

MID(var ,st [, l] ) = var1

Remarks

var The string that is assigned.
Var1 The source string.
st The starting position.
l The number of characters to get/set.
Operations on strings require that all strings are of the same type(internal or external)


See also
LEFT , RIGHT


Example


Dim s As XRAM String * 15, z As XRAM String * 15
s = "ABCDEFG"
z = Mid(s,2,3)
Print z 'BCD
z="12345"
Mid(s,2,2) = z
Print s 'A12DEFG
End