Announcement

Collapse
No announcement yet.

Suggestion

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

    Suggestion

    I would like to see a Meta command similar to #INCLUDE in which it can shell out to an executable that can return some code to the compiler.

    Example...

    #EXEINCLUDE "librarian.exe myapp.ini"

    In this case the #EXEINCLUDE Meta statement would shell to an application called librarian.exe with the parameter mayapp.ini. The librarian.exe program would then return code text via the STDOUT. The compiler would then read via STDIN and compile the supplied text as if it was written in the original source file. This would allow programmers to create librarians and other add-on tools.

    An alternative to allowing code in via the STDIN would be something like this...

    #EXEINCLUDE "librarian.exe myapp.ini", "return.inc"

    In this example the first quoted section acts like the first example except that the compiler would look to include the "return.inc" rather then look for something from STDIN.

    In either example I would like to see the PB environment variables passed in some way to the EXE so it can act appropriately on them.

    ------------------
    George W. Bleck
    Senior System Engineer
    KeySpan Corporation


    [This message has been edited by George Bleck (edited August 19, 2001).]
    <b>George W. Bleck</b>
    <img src='http://www.blecktech.com/myemail.gif'>

    #2
    I should mention this is a suggstion for the next compiler version if it was not self evident <grin>.

    ------------------
    George W. Bleck
    Senior System Engineer
    KeySpan Corporation
    <b>George W. Bleck</b>
    <img src='http://www.blecktech.com/myemail.gif'>

    Comment


      #3
      Yep. We'll add it to the list.

      "PB environment variables", hmmm. If you're thinking of the IDE settings,
      you can find them in the registry under HKEY_LOCAL_MACHINE and
      HKEY_CURRENT_USER\Software\PowerBASIC ...

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

      Comment


        #4
        I was referring to the variables used to determine the compiler you are using. (I beleive they are %PBCC, %PBDLL, etc)

        ------------------
        George W. Bleck
        Senior System Engineer
        KeySpan Corporation
        <b>George W. Bleck</b>
        <img src='http://www.blecktech.com/myemail.gif'>

        Comment


          #5
          %PB_DLL32, %PB_CC32 are already available... see %DEF, #IF, etc. (there is an Errata note on the list of equates - see the FAQ forum).
          For example:
          Code:
          #IF %PB_DLL32
            #COMPILE DLL
          #ELSE
            #COMPILE CON
          #ENDIF
          Note that these equates are always "defined", but it is their value that varies depending on the platform, so be careful when using %DEF() to test these variables.


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

          Comment


            #6
            Lance... I was referring to a way that an external program shelled out to from the compiler could interpret these values.

            Indeed, these values are defined in the compiler, but an outside program would need to know these values in order to act upon them.



            ------------------
            George W. Bleck
            Senior System Engineer
            KeySpan Corporation
            <b>George W. Bleck</b>
            <img src='http://www.blecktech.com/myemail.gif'>

            Comment

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