Announcement

Collapse
No announcement yet.

Just a small debug trick.

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Just a small debug trick.

    I'm sure that I'm the ONLY one that has encountered this problem that NOBODY else has ever run across, however...

    Sometimes (read: Frequently) I need to check the value/string contents of a variable. Before, I would just put the (whatever) somplace on a blank space on the screen but that would pretty much screw up the display.

    Try this:
    Code:
    SUB debug
        PCOPY 1,2
        CLS
        PRINT;{Whatever you need to print/check}
        WAITKEY$
        PCOPY 2,1
        END SUB
    Just put it someplace conventient in your program and change the PRINT statement as needed.
    There are no atheists in a fox hole or the morning of a math test.
    If my flag offends you, I'll help you pack.

  • #2
    Just to make sure all the lurkers are aware

    TRACE
    TRACE
    TRACE

    the only debugging tool I use. One of the best features ever add to the compilers!!

    James

    Comment


    • #3
      #DEBUG PRINT, see http://www.powerbasic.com/support/he...astatement.htm
      Sincerely,

      Steve Rossell
      PowerBASIC Staff

      Comment

      Working...
      X