Starting from position p, returns the next m characters of a string expression.
Mid[$](a$, p% [,m%])
a$:sexp
m%, p%:integer expression
Mid$(a$, p%, m%) returns, starting from position p% (inclusive), up to m% characters of the string expression a$. If m% is not given, the whole string from position p% is returned.
OpenW # 1
Print Mid$("Hello GFA", 7, 5) // Prints GFA
Print Mid$("Hello GFA", 1, 5) // Prints Hello
Print Mid$("Hello GFA", 3) // Prints llo GFA
Without the optional $ character the function still returns a String data type and not a Variant.
String, Left$(), Right$(), SubStr()
{Created by Sjouke Hamstra; Last updated: 20/06/2017 by James Gaite}