Announcement

Collapse
No announcement yet.

Bug in PB IDE

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

  • Bug in PB IDE

    I have found a "for me very nasty" bug in the PB IDE.

    To reproduce it open a new PB File and leave the name as
    NoName1.Bas

    Add the following code

    <code>
    #COMPILE EXE '''"p.exe"

    FUNCTION WINMAIN (BYVAL hInstance AS LONG, _
    BYVAL hPrevInstance AS LONG, _
    lpCmdLine AS ASCIIZ PTR, _
    BYVAL iCmdShow AS LONG) AS LONG
    MSGBOX "Hello NoName1"

    END FUNCTION ' WinMain
    </code>

    Click on Build and Execute and the Messagebox appears.
    Now remove the comment in the #Compile directive
    and change the MsgBox Statement to
    MSGBOX "Hello p".
    Click on Build and Execute again.

    Regards,

    Torsten Rienow



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

  • #2
    So where is the bug? What behavior do you consider an anomally?

    This works perfectly for me. I get the two message boxes.

    Why are you naming a program Nonamex.bas? That's not a safe thing to do. You could screw around and overwrite some work.

    Comment


    • #3
      Ron,

      the first Msgbox should display "Hello NoName1",
      the second Msgbox should display "Hello P",
      but the second Msgbox displayed "Hello NoName1",
      that means, that "P.EXE" wich has been created after
      removing the comments from the #COMPILE directive, was
      not executed. Instead the IDE has executed the
      NoName1.exe wich is obsolete after i have forced the
      compiler to create the "P.EXE".
      This is proofed by examining the process list.
      If i delete the NoName1.Exe from the HD nothing is executed
      from HD.

      Regards,

      Torsten Rienow


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

      Comment


      • #4
        I'll bet 5 Baht that the IDE is by design going to attempt to execute the filename which matched the source file - in this case Noname1.bas - and not the specified output filename (if any).
        I reckon the official verdict will be forthcoming. It is likely a "design decision" rather than an oversight (b.u.g).

        Thanks for clarifying the execution from the IDE. I was executing from the command line.

        Comment


        • #5
          Try to make an Error.bas...



          ------------------
          hellobasic

          Comment


          • #6
            Righto, Ron. We aim to revise this in the future.

            ------------------
            Tom Hanlin
            PowerBASIC Staff

            Comment

            Working...
            X
            😀
            🥰
            🤢
            😎
            😡
            👍
            👎