28x input pins

chingdevil

New Member
If I use a statement in a program like:-
If pin4 = 0 and pin5 = 1 then stop, it is accepted by the programming software. If I change it to:-
If pin6 = 0 and pin7 = 1 then stop, any ideas please
 

BeanieBots

Moderator
Either line should be OK for a 28X.
Do you have the editor set to 28X mode?

On second thoughts, isn't "stop" a reserved word and cannot be used as a label?

Edited by - beaniebots on 4/25/2005 12:42:46 PM
 

chingdevil

New Member
It does not matter what is after "then" the software always says there is an error in the line. the software is set for 28x
 

hippy

Ex-Staff (retired)
Both lines compile okay when I try them using a valid label, but I'm a bit concerned when you say "If pin4 = 0 and pin5 = 1 then stop" compiles, because it doesn't, and it shouldn't.

Which version of the Programming Editor are you using ?

What is the exact error message you are receiving ?

What is the exact text of the complete line where you are getting the error message.

Edited by - hippy on 4/25/2005 2:03:30 PM
 

chingdevil

New Member
I must appologise, I have got myself confused. What I was trying to ask was why I can not compile three if - then statements in a row, for example.
if pin4 = 0 and pin5 = 1 then slow
if pin5 = 0 and pin4 = 1 then fast
if pin6 =1 and pin7 = 1 then stop. I always get "error in this line" for this line of code.
What stops me having this in a program?I Sorry for the confusion in my last postings
 

hippy

Ex-Staff (retired)
All three IF statements are intended to conditionally jump to other code which have Labels, "Fast", "Slow" and "Stop" respectively. The problem is that "Stop" is a command name and cannot therefore be used as a label. The same would be true of "Halt" ( press F1 in the Programming Editor to find a list of names which are command names and can't be used as labels ).

The simple solution to your problem is to use a different name for your label instead of "Stop".
 
Top