. . . . . . . . . .
. . . . . . . . . .
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Sorry, i guess i misunderstoot... PicBasic = program language and proton ide is the compiler, or is my mind freaking out with me now ? :P
Hi,
No, your mind is not freaking out but this is not the forum for Proton.
It's often confusing as there are several BASIC-compilers for PIC available from different vendors, many of them with the phrasing or names like PICBasic.
It doesn't get easier by the fact the THIS forum (which is for the PICBASIC compiler from MELABS) are hosted by Crownhill which are the developers of the Proton compiler.....
For Proton specific questions you might have better luck at the Proton forum.
With that said, and without knowing Proton the DEC modifier (at least in PBP) is used to convert the value contained in a variable to ASCII text in order to print to a display or serial terminal etc. If you do something like Temp = 100 the variable called Temp will contain the value 100. Now you can do stuff likeBut if you want to display the value of Temp on a display or terminal simply saying LCDOUT Temp (PRINT Temp in your case) will display the letter 'd' because 100 is the ASCII code for 'd'Code:If Temp > 125 then Goto CoolDown If Temp < 75 then Goto HeatUp
In order to display 100 the compiler needs to convert the value 100 into the text '1' '0' '0' and THAT is what the DEC modifier does.
/Henrik.
Bookmarks