(Noobie) Pipe symbol erroring Pin := |< PinNum
Bob Drury
Posts: 236
in Propeller 2
Getting an error message " Expected an Expression Term " for following spin code:
Con
_clkfreq = 200_000_000
Var
long BinPattern
long PinNum
Pub main()
PinNum := 3
BinPattern := |<PinNum
debug(UBIN(BinPattern))
Looking for help, using Propeller II IDE Ver 2.5.1 the error is at the pipe symbol "|<PinNum"
(Indenting is correct , it is just viewing wrong in this comment window)
Regards
WRD Bob Drury
Comments
In a very obnoxious turn of events, that operator isn't in Spin2 and IIRC there's no direct equivalent. There's DECOD but that's off-by-one, I think. Not 100% sure though.
The equivalent would be:
Thanks Wuerfei and Ariba
1<<PinNum makes sense it does the samething why have two commands
Regards
WRD Bob Drury
It seems decod does indeed replace |<
Will try out
Thanks JonnyMac
Regards
WRD Bob Drury