|
debug dec variablename
Posted by Joe Johnson at 2/9/2001 9:53 PM EST
Engineer on team #47, Chief Delphi, from Pontiac Central High School and Delphi Automotive Systems.
In Reply to: Debug function in programming?
Posted by Eric Reed on 2/9/2001 9:10 PM EST:
By decimal I assume you mean the ascii for the
characters that display the value of the variable in
decimal.
variablename var byte
variablename = 0
Main:
debug hex2 variablename, " ", bin8 variablename, "
",dec variablename, " ",cr
variablename = variablename + 1
Goto Main
The above code would pin
00 00000000 0
01 00000001 1
02 00000010 2
03 00000011 3
04 00000100 4
05 00000101 5
06 00000110 6
07 00000111 7
08 00001000 8
09 00001001 9
0A 00001010 10
.
.
.
FE 11111110 254
FF 11111111 255
00 00000000 0
01 00000001 1
02 00000010 2
.
.
.
If you don't have the PBASIC manual, buy one. I bought
Version 2.0 of the manual (new this year) and I am very
happy with it. It is a pretty big improvement over
Version 1.9 in my opinion. Worth the price.
Good luck.
Joe J.
__________________
This message was archived from an earlier forum system. Some information may have been left out. Start new discussion in the current forums, and refer back to these threads when necessary.
|