Announcement

Collapse
No announcement yet.

What's going on???

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

  • What's going on???

    I have a VERY strange bug in my PB/DLL Compiler. I wrote this
    program a week ago that includes the following code:

    CA1 = INPUTBOX$("Enter path/file name to search for.","","quit")
    CA1 = TRIM$(CA1, CHR$(10) + CHR$(13))
    IF UCASE$(CA1) = "QUIT" THEN EXIT FUNCTION
    IF MID$(CA1,2,1) <> ":" THEN
    ...

    The expected input is either a file name or a full
    path/file name. That's what the last line in the example code
    tests for.

    The problem is, all-of-a-suddenly, the IF/END IF block is ALWAYS
    executed, even when the 2nd char in CA1 is ":"! The ONLY
    changes that I made to the code were within the IF/END IF block,
    which I then compiled. SO, those changes should NOT cause the
    END/END IF block to ALWAYS be executed!

    Can anybody give me a CLUE as to what could be causing this
    aberration???

    Please???

    Clay Clear


    ------------------
    Head SysOp/Owner
    Clear's Critters BBS
    Node 1: (218) 229-2593
    Node 3: (218) 229-2353

  • #2
    Disregard the original posting. The problem turned out to be
    code that I had added to the program a few days ago, that made
    illogical tests for the flags set in the IF/END IF block AFTER
    the block statements. Problem fixed. <blushes deeply> <grin>

    Clay Clear


    ------------------
    Head SysOp/Owner
    Clear's Critters BBS
    Node 1: (218) 229-2593
    Node 3: (218) 229-2353

    Comment


    • #3
      Impossible to say without seeing entire code. What does MSGBOX MID$(CA1,2,1)
      tell you after INPUTBOX?

      BTW, why TRIM$(CA1, CHR$(10) + CHR$(13))? Standard line feed sequence in
      Windows textbox is $CRLF, or CHR$(13) + CHR$(10))


      ------------------

      Comment


      • #4
        Borje,

        Thanks, but like I said in my reply to my own original posting,
        I found the bad code, and fixed the program. It wasn't a problem
        with the PB/DLL Compiler, after all - it ws a problem with some
        code that I had added to the program a few days ago. I have
        fixed the problem since my original message.

        Thanks for the tip about $CRLF! It never even occurred to me to
        use that equate! I'll use it in my future programs.

        Thanks again!

        Clay Clear



        ------------------
        Head SysOp/Owner
        Clear's Critters BBS
        Node 1: (218) 229-2593
        Node 3: (218) 229-2353

        Comment

        Working...
        X