We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
how to get a string input and compare it . say for example: if i get a string input"LED ON " and i want to compare it with a list of string say "LED ON ",LED OFF,FAN ON,FAN OFF.....
give me the commands and some sample programs .please.
Gee - what Keil tool would be able to compile that?
C or C++ does not support case statements with non-integer values.
The program would require individual strcmp(input,ref) or a hash lookup or a binary search in a sorted array (bsearch).
one or 2 small errros but the theroy is good.
So that's intended to be pseudo-code, and not any real 'C', then?
yah thats' it
but i have used macrows to do it ;=O)
"but i have used macrows to do it ;=O)"
Still not in the 'C' language.
i use a pre pre processsor to do the macrops:called jonsprepreprocessor.ocx
if your' interesting let me know and i can send it
in BASIC but not C
try strcmp() or strncmp()