Is that possible to change sub from lib according to #variable ?
Thanks.
Just like example:
Code: Select all
Device=18F2550
Include "expermt.bas"
#variable controler = 3
test()
#variable controler = 1
test()
#variable controler = 2
test()
#variable controler = 3
test()
End
Code: Select all
module expermt
public inline sub test()
dim A,B as byte
#if controler=0 then
A=0
B=0
#endif
#if controler=1 then
A=1
B=0
#endif
#if controler=2 then
A=0
B=1
#endif
#if controler=3 then
A=1
B=1
#endif
#if controler>3 then
#warning"controler has to be in(0-3)!"
#endif
end sub
end