I have a string in a variable array ie STR mydata(0) = "Hello" I would like to compare it to a list of around 60 other strings to see if they match. Both Case and blanks are sensitive! ie STR storeddata(0) = "Random Text" " " " " " " " " STR storeddata(60) = "More Data Here too" Whats the quickest and simplest way to compare a string variable to others?? Could I do (say) ...... Search: For n = 1 to 60 If STR mydata(0)= STR storeddata(n) then goto Match next n NoMatch: etc etc Match: etc etc |
|
STR compare in picbasic
Started by ●November 25, 2002
Reply by ●November 25, 20022002-11-25
If
PICBasic allows inline assembly, you could use this:
http://www.piclist.com/techref/piclist/codegen/keyword_interpreter.htm
--- -----Original Message----- I have a string in a variable
array From: comalco2000 [mailto:c...@yahoo.com.au] Sent: Sunday, November 24, 2002 10:51 PM To: p...@yahoogroups.com Subject: [piclist] STR compare in picbasic ie STR mydata(0) = "Hello" I would like to compare it to a list of around 60 other strings to see if they match. Both Case and blanks are sensitive! ie STR storeddata(0) = "Random Text" " " " " " " " " STR storeddata(60) = "More Data Here too" Whats the quickest and simplest way to compare a string variable to others?? Could I do (say) ...... Search: For n = 1 to 60 If STR mydata(0)= STR storeddata(n) then goto Match next n NoMatch: etc etc Match: etc etc to unsubscribe, go to http://www.yahoogroups.com and follow the instructions ">Yahoo! Terms of Service. |