Shop OBEX P1 Docs P2 Docs Learn Events
newbie DEBUGIN question — Parallax Forums

newbie DEBUGIN question

SCFalconrySCFalconry Posts: 5
edited 2008-03-06 05:42 in BASIC Stamp
I'm getting the feeling I'm over looking the obvious... but after several days of searching old post in the forums and reading PDF's I'm still stuck... on something that I know is super simple compared to what I see the rest of you guys/gals are discussing.·· Someone please point me in the right direction or throw me a bone.·· I would like to have the debug window ask me for input and let me respond "Yes" or "No"····I have found formatters and specialformatters·for·DEBUGIN·in the bsmv2.2 pdf..... but I'm not finding/understanding how to input a string·of characters that doesn't·contain·A,B,C,D,E or·F.

···· Answer VAR word
··· DEBUG "Enter Yes or No "
··· DEBUGIN ????·· <---- what do I need to put here?
··· If Answer="yes" then
······ GOSUB wiget_routine
··· ELSEIF Answer="no" then
······ GOSUB anti_wiget_routine
··· ENDIF


Should I be using····STR, HEX, NUM, WAIT or someother formatter?
What I've been doing for the past few days until I figure this out is similar to this:


··· Answer VAR nib
··· DEBUG "Yes=1 and No=0 ", CR
··· Debugin dec Answer
··· If Answer=1 then
······ GOSUB wiget_routine
··· ELSEIF Answer=0 then
······ GOSUB anti_wiget_routine
··· ENDIF

Thanks in advance,
Marty


Post Edited (SCFalconry) : 3/6/2008 5:41:35 AM GMT

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2008-03-06 05:38
    It's relatively hard to get a "yes" or "no" answer. It's easier to get just a single letter like
    Answer var byte
    DO
      DEBUG CR,"Enter (Y)es or (N)o: "
      DEBUGIN Answer
    LOOP UNTIL Answer = "Y" OR Answer = "N"
    IF Answer = "Y" THEN
       ' do it
    ELSE
      ' do something else
    ENDIF
    

    Post Edited (Mike Green) : 3/6/2008 5:48:03 AM GMT
  • SCFalconrySCFalconry Posts: 5
    edited 2008-03-06 05:42
    Mikem

    Thanks for the bone.

    Can't wait to try it.... Don't have access to the homeworkboard until tomorrow.

    Thanks again,
    Marty
Sign In or Register to comment.