Srch. DORIC 9.65, INFO-Text software
विज्ञापन
विज्ञापन
SRCH
SRCH
item-1 [FOR] item-2 [FROM] item-3 [TO] item-4
search a character string for a sub string
arguments
item-1 string to be searched : character_item
item-2 sub-string to be located : character_item
item-3 starting column or 0 to search whole string :
numeric_item
item-4 located position : numeric_item
notes discussion
n
If item-2 is a character variable trailing spaces will be stripped before starting the search. If you need to search for spaces item-2 must be a literal.
This command searches item-1 for the sub-string in item-2 starting at the column given in item-3. If the sub-string is located, the position is returned in item-4. If it is not located, item-4 is returned as zero.
example
FO $CHR1,8
FO $CHR2,2
FO $NUM40,2,I
$CHR1 = ‘ABCDEFGH’
$CHR2 = ‘DE’
SRCH $CHR1 FOR $CHR2 FROM 0 TO $NUM40
DISPLAY $NUM40
4
INFO Reference Manual Commands 507
डाउनलोड
विज्ञापन