Announcement

Collapse
No announcement yet.

Error Codes when shelling to PBDll.exe

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

  • Error Codes when shelling to PBDll.exe

    Does PBDll.exe return error codes when you shell to it?

    For example in Semens excellent wrapper ie:

    Result = SHELL( "C:\PBDLL60\Bin\PbDll.Exe " + COMMAND$, 1)

    Does Result contain error codes?
    Is there a way to determine if the Compile was sucessfull so I can then add the CRC, Compress it etc etc?


    ------------------
    Kind Regards
    Mike

  • #2
    Mike,

    Use the /L option to create the LOG file and then have another
    SHELL line that opens the log file in notepad.

    Works fine.

    Regards,

    [email protected]

    ------------------
    hutch at movsd dot com
    The MASM Forum - SLL Modules and PB Libraries

    http://www.masm32.com/board/index.php?board=69.0

    Comment


    • #3
      Thx Steve,

      I thought you guys would have a clever idea!

      I know the result from the Shell is defined in the manual , but PBedit.exe somehow gets the results of the compile from PBDll.exe and creates an alert window with the error number etc, so I thought there might be more information available.

      ------------------
      Kind Regards
      Mike

      Comment


      • #4
        I know the result from the Shell is defined in the manual , but PBedit.exe somehow gets the results of the compile from PBDll.exe and creates an alert window with the error number etc, so I thought there might be more information available.
        I think Pbedit.exe just reads the log file - win, lose, or draw.

        MCM


        Michael Mattias
        Tal Systems (retired)
        Port Washington WI USA
        [email protected]
        http://www.talsystems.com

        Comment


        • #5
          From what I can see, a log file is always created and then PBedit
          reads it. If the option "Create log file" is unmarked, it deletes
          this file. Easy enough for custom editors to check this log file,
          parse out the line that starts with "Error", then look for something like
          "(191:50):", which tells at what line and caracter position error occurred.

          If this line is not visible, a clever editor then scrolls it into view
          and places the caret where error occurred. PBedit is halfway there, it
          always scrolls and put line at top, but nothing more, so it helps to
          to read the error message carefully and remember given caret position.

          Would be more helpful if it placed caret in position too..


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

          Comment


          • #6
            Borje has the theory correct. PBEDIT uses a regular expression to isolate the row/column from the log file text, and then act upon it.

            Moving the caret to the column number after a compile-time error is already high on the wish list.

            ------------------
            Lance
            PowerBASIC Support
            mailto:[email protected][email protected]</A>
            Lance
            mailto:[email protected]

            Comment


            • #7
              Lance,

              If I get to that log file befor control is returned to PBedit and delete all the error info I assume that PBedit wont give me an alert and scroll the file? (cos I hate that!)

              Request:
              Option to turn off file and path info in error window
              Option to disable scrolling to line
              Option to tirn off scrolling to the end of file when it cant overwrite the file. I have to scroll all the way back up my file and often i lose my place - frustrating when you forgot to quit the app cos you are looking at its debug results in a MSGBOX window.

              ------------------
              Kind Regards
              Mike

              Comment


              • #8
                You'll have to experiment with intercepting/clearing the LOG file... just be aware that any "solution" you come up with today may not work with the next version of the compiler.

                However, PBEDIT allows you to specify the compiler file so you can insert your own "preprocessor".

                Good luck with your experiments! I will also pass your comments/requests to R&D. Thanks!


                ------------------
                Lance
                PowerBASIC Support
                mailto:[email protected][email protected]</A>
                Lance
                mailto:[email protected]

                Comment


                • #9
                  For R & D, there's always CreateProcessEx...

                  ...or the compiler (when it becomes 32-bit) could be provided as a DLL, and passing the compile results back to the IDE would be pretty straightforward.

                  Using the log file this way is so, well, pedestrian....

                  MCM
                  Michael Mattias
                  Tal Systems (retired)
                  Port Washington WI USA
                  [email protected]
                  http://www.talsystems.com

                  Comment


                  • #10
                    *** Shameless Plug ***

                    The JellyFish Editor places the caret to the position in the
                    file where the error occurred.



                    ------------------
                    Paul Squires
                    mailto:[email protected][email protected]</A>
                    Paul Squires
                    FireFly Visual Designer (for PowerBASIC Windows 10+)
                    Version 3 now available.
                    http://www.planetsquires.com

                    Comment

                    Working...
                    X