Shop OBEX P1 Docs P2 Docs Learn Events
DEBUG variations — Parallax Forums

DEBUG variations

agentileagentile Posts: 101
edited 2005-01-24 23:25 in BASIC Stamp
Does anyone know how to modify the DEBUG command to change the number of digits displayed.· The manual says for binary to use

DEBUG BIN{1..16}

If I use the brackets {}, I get an error, if I don't use them I get an error.· I am trying to write a variable value to the screen using binary 16 digits.· Let's just say that the value is X.· What is the code which will put 16 digits of X onto the screen?

thanks
AG

Comments

  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-01-24 23:23
    The {} in our manual and help file indicate optional items. If you do this:

    DEBUG BIN idx

    ... then the number of actual digits to display the value of idx will be used. What you're asking for is:

    DEBUG BIN16 idx

    If idx has a value of 1, you'll get this:

    0000000000000001

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
    Dallas, TX· USA
  • agentileagentile Posts: 101
    edited 2005-01-24 23:25
    Jon,

    ·Boy, I'll bet I tried that 4 times, and I must have had a spelling error in it, because it wouldn't work.· I've got it now.· thanks.

    AG
Sign In or Register to comment.