DEBUG / DEBUGIN Example

BS2 icon BS2e icon BS2sx icon BS2p icon BS2pe icon BS2px icon {PBASIC 2.5}

Syntax: DEBUG, DEBUGIN

 

 

 

NOTE: The example below is written for the BS2 and will run on any of the BS2-family modules. Modify the $STAMP directive (as required) before downloading to the BS2e, BS2sx, BS2p, BS2pe, or BS2px.

' DEBUG_DEBUGIN.BS2
' This program demonstrates the ability to accept user input from the
' Debug Terminal, and to accept numeric entry in any valid format.

' {$STAMP BS2}
' {$PBASIC 2.5}

myNum           VAR     Word


Main:
  DO
    DEBUG CLS, "Enter any number: "     ' prompt user
    DEBUGIN SNUM myNum                  ' accept number in any format

    DEBUG CRSRXY, 0, 2,                 ' display in all formats
          SDEC ? myNum,
          SHEX ? myNum,
          SBIN ? myNum
    PAUSE 3000
  LOOP                                  ' do it again
  END

Go to Welcome page

BASIC Stamp Help Version 2.5.4

Copyright © Parallax Inc.

8/8/2012