Conversion Formatters
piguy101
Posts: 248
in BASIC Stamp
I am puzzled about the conversion formatters in the code listed at (https://www.parallax.com/sites/default/files/downloads/604-00060-MCP3202-Demo.bs2). My understanding is that the sample code creates a number up to 5000 to represent mV. However, the code displays the output in volts, so that requires the insertion of a decimal after the first digit. Here is the specific part:
DEBUG HOME, CRSRXY, 11, 1, DEC mVolts0 DIG 3, ".", DEC3 mVolts0I believe that DIG 3 only returns the most significant digit, but wouldn't the DEC3 display the same first digit again (plus the next two digits) after the decimal? That's where I am confused. Thanks
Comments