Assembly Language Help (alang.hlp) (
Table of Contents;
Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software,
purely for historical purposes.
If you're looking for up-to-date documentation, particularly for programming,
you should not rely on the information found here, as it will be woefully
out of date.
Extract Characters from String
◄Example► ◄Up► ◄Contents► ◄Index► ◄Back►
────────────────────────────────────────────────────────────────────────────
Syntax: @SubStr(string, start [,length])
name SUBSTR textitem, start [,length]
See also: INSTR, SIZESTR, CATSTR, TEXTEQU, Angle Brackets (<>),
expression operator (%).
Description:
The @SubStr macro function extracts specified characters from a
text item. If <length> is not given, the function will return all
characters to the right of (and including) the character pointed
to by <start>. The @SubStr function will not expand macros or
expressions unless you use the expression operator (%).
The SUBSTR directive performs the same function but assigns the
result to <name>. These two lines are equivalent:
country TEXTEQU @SUBSTR (<AndorraMonacoLuxembourg>,8,6)
country SUBSTR <AndorraMonacoLuxembourg>,8,6
;country is <Monaco>
Parameter Description
name A unique symbolic name.
string A string to extract characters from.
textitem A text item to extract characters from.
See: ◄text item►
start Starting position of substring; the first character
is indexed as 1. Must be a positive integer constant.
length Number of characters to extract. Must be a positive
integer constant.
-♦-