Documentation Comments
Use this form to comment on this topic. You can also provide any general observations about the Online Documentation, or request that additional information be added in a future release.
RealityV15.1Online Documentation (MoTW) Revision 7
CONVERT Statement (DataBasic) (m618703+convert_s.htm)
Replaces individual characters within a string.
CONVERT oldCharList TO newCharList IN string
oldCharList is the list of characters to be changed.
newCharList is a list of replacement characters.
string is a variable containing the string to be processed.
The CONVERT statement is similar to the CONVERT function, but does not create a new string; it directly modifies the string.
If data case insensitive mode is selected (see Case Sensitivity), case is ignored when searching string for the characters in oldCharList.
CONVERT function, CHANGE function.
X = "ABC123DEF456DKDKEIS" Y = "C2DK" Z = "Z9:" CONVERT Y TO Z IN X
Changes the value of variable X (ABC123DEF456DKDKEIS) to ABZ193:EF456::EIS. Note that K is missing from the modified string because K did not have a replacement character in Z.