Is there any way to test only part of a fixed length string
example :
myvar = text
test = copystr(myvar,1,8)
case test of
'ABC*****' :
'ABCD****' :
'ABCDE***' :
end
i'am looking for some sort of "joker" sign to use in a textstring '*' do not work
Regards
Peter
0
Comments
Therefore, you have to use:
<BLOCKQUOTE><font size="1" face="Verdana, Arial">code:</font><HR><pre>
IF COPYSTR(test,1,3) = 'ABC' THEN BEGIN
END;
IF COPYSTR(test,1,4) = 'ABCD' THEN BEGIN
END;
IF COPYSTR(test,1,5) = 'ABCDE' THEN BEGIN
END;
</pre><HR></BLOCKQUOTE>
If necessary, you need to put ELSE's between the IF's, otherwise the other code gets executed also when COPYSTR(test,1,3) = 'ABC'.
Hope this helps.
I'll use the solution you suggest
Thanks for your help and a merry crismas
Peter
John