Quote Originally Posted by Acetronics View Post
Something I can't understand ...

Porta.0[14,20 or 26] ???

Also note relay[] can be a bit array...

May be some " select case " will do a better job here ...

Alain
Porta.0[14,20 or 26] is supposed to be an undeclared array and since the PORTS are located sequentially in memory PicBasic Pro takes the value in brackets and treats it as an offset from porta.0 so

porta.0[1] is porta.1
porta.0[8] is portb.0

The problem with using loops and select case is that my code will start to get really long and nasty looking.