Help with Comparison and Variable Types
DiablodeMorte
Posts: 238
'ello everybody,
I've having alittle difficulty getting my IF statement working
Here's my code:
The IF statement never returns true!
When ever I refrenced Seconds I usually do it w/ Seconds.HIGHNIB and Seconds.LOWNIB
When I had AlarmSecond defined as such:
the comparison worked, but when I derive AlarmSecond from a serin command the comparison fails.
I usually derived Seconds from the following line:
Any help?
Is there a function I'm missing?
I've having alittle difficulty getting my IF statement working
Here's my code:
Seconds VAR Byte AlarmSecond VAR Byte IF((AlarmSecond = Seconds)) THEN Alarm
The IF statement never returns true!
When ever I refrenced Seconds I usually do it w/ Seconds.HIGHNIB and Seconds.LOWNIB
When I had AlarmSecond defined as such:
AlarmSecond = $21
the comparison worked, but when I derive AlarmSecond from a serin command the comparison fails.
I usually derived Seconds from the following line:
SHIFTOUT DTA, Clk, LSBFIRST, [noparse][[/noparse]%1\1,BrstReg\5,%10\2] SHIFTIN DTA, Clk, LSBPRE, [noparse][[/noparse]Seconds,Minutes,Hours,Date,Month,Day,Year]
Any help?
Is there a function I'm missing?
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
When the going gets weird, the weird turn pro. -- HST
How would i convert this data to the right type?
Can you post your complete program?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
When the going gets weird, the weird turn pro. -- HST