if..else
ice-egoz
Posts: 55
this is my statement: area18: IF latitudeMin=17 AND longitudeMin=37 THEN DEBUG "Tuas South"
can i do this:
area18: IF latitudeMin=17 AND longitudeMin=37 THEN serData=·"Tuas South"
I know that the above statement will give me an error.. but what other ways can i use to do this?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
I need all ya guidance Masters. [noparse]:)[/noparse]
can i do this:
area18: IF latitudeMin=17 AND longitudeMin=37 THEN serData=·"Tuas South"
I know that the above statement will give me an error.. but what other ways can i use to do this?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
I need all ya guidance Masters. [noparse]:)[/noparse]
Comments
to the beginning of your program. This is presuming that you're
using the newer Basic Stamp Editor/Development System. Your
statement would fall under the the single line syntax of IF...THEN...ELSE
If you're not using the new PBASIC 2.5 syntax then the part
after the THEN should be a statement label. If this is the case
then you could try something like this:
Well, it works for me.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
-Rusty-
--
Rusty Haddock = KD4WLZ = rusty@fe2o3.lonestar.org
**Out yonder in the Van Alstyne (TX) Metropolitan Area**
Microsoft is to software what McDonalds is to gourmet cooking
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
Dallas Office
serData······ VAR········· Byte(4)
area33: IF latitudeMin=18 AND longitudeMin=38 THEN DEBUG "Tuas" ' over here can i make it serData? rather tham DEBUG
area34: IF latitudeMin=19 AND longitudeMin=38 THEN DEBUG "Tuas"
area35: IF latitudeMin=20 AND longitudeMin=38 THEN DEBUG "Tuas/AYE"
instead of wasting memory, I decided to use a VAR Byte(4) to store the String rather than DEBUG. I am using version 2.5..
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
I need all ya guidance Masters. [noparse]:)[/noparse]
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
Dallas Office
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
I need all ya guidance Masters. [noparse]:)[/noparse]
For this code, "eeAddr" is the pointer to the string.· It is set to the first location of the (zero-terminated) string before calling the routine.
Our WAM and StampWorks books have examples that will help you -- you might want to take a week or so to work through them before continuing with your sophisticated experiments.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
Dallas Office