Case-insensitive is the basic design of LabTalk as Jose pointed out, though I found that string serach with %[] notation CAN find a string as is in a case-sensitive way. See the sample below:
%a="E"; %b="e"; if(%[%a,'E']==e) type lower; else type CAPITAL; ; ==> CAPITAL if(%[%b,'E']==e) type lower; else type CAPITAL; ; ==> lower
I don't find a solution for this, even not using the Asc() function, that should return the ASCII code for the character inside the brackets. It happens that
Origin 6.0 SR4 and Origin 6.1 users can use new string switch( ) capabilities for more control. For example:
GetString "Enter a string";// result in %B switch(%B) { CASE "a": type -a You entered an a.; /* case sensitive */ break; case "b": CASE "c": // case and default can both be either upper or lower cases type -a You entered a 'b' or 'c'; break; #comments can be added as such also case "A": type -a You entered an A.; /* case sensitive */ break; case "A" "B" "F" to "Z": type "You entered A or B or between F and Z"; break; case 1 2 5 to 7: type You entered 1 or 2 or between 5 and 7; break; default: type "No match, this is the default case."; break; }
Note that the lexical order is:
AaBbCc...
so 'b' and 'B' would both be found by
case "A" to "C":
[This message has been edited by Greg (edited 10-12-2000).]