Variable contains reading?
Root / Programming Questions / [.]
ErtasCreated:
The function STRSRCH in the following code yields TRUE if the first string argument includes the second string argument and FALSE if not.
DEF STRSRCH(A$,B$) VAR LA=LEN(A$),LB=LEN(B$) VAR I IF LB>LA THEN RETURN FALSE FOR I=0 TO LA-LB IF MID$(A$,I,LB)==B$ THEN RETURN TRUE NEXT I RETURN FALSE END READ A$,B$ IF STRSRCH(A$,B$) THEN ?A$;:?" INCLUDES ";:?B$;:?"." ELSE ?A$;:?" DOESN'T INCLUDE ";:?B$;:?"." ENDIF DATA "7291003","03"
For very simple searches on strings, you might be able to use INSTR()
>INSTR: Searches for the target character string in another character string >>Variable = INSTR( [Start position,] "Character string to search in", "Character string to search" )
INSTR(S$, "...") > -1or more hacklike with numbers
INSTR(STR$(72901003), "3") > -1