Announcement

Collapse
No announcement yet.

#utility

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

  • jcfuller
    replied
    Originally posted by Michael Mattias View Post
    Basically it sounds like 'token' for which you may parse the source code, knowing there will be only one and knowing the text will be the first whitespace-delimited characters following.
    MCM
    You can have as many as you want.

    James

    Leave a comment:


  • Mark Farrar
    replied
    ok

    ok ... noted

    I read the help file a bit differently ... ignored by the PowerBASIC compiler. ... hmmm.

    It could have meant did not produce executable instructions, but still could mean imbed (like a resource) into the .exe file; However, Michael, I'm sure you are correct ... I wish that the help file was a bit more descriptive in some cases ... this is one of those.

    So... bottom line. It's for all intent and purpose, a comment. It's just a unique tag that can be found and parsed to find sting "xyz" that follows the #Utility statment.

    Leave a comment:


  • Michael Mattias
    replied
    Well, I think the online help explains it pretty well...
    #UTILITY metastatement
    Purpose
    Compiler directive to allow external utility programs to read text inserted on the #UTILITY line.

    Syntax
    #UTILITY "any text for an external program"

    Remarks
    The entire line is ignored by the PowerBASIC compiler.
    Basically it sounds like 'token' for which you may parse the source code, knowing there will be only one and knowing the text will be the first whitespace-delimited characters following.

    If it's ignored by the compiler, it ain't in the compiled PE file.

    And "In case someone wanted to write a utility to access the imbedded string" I just addressed above.

    If you want something in the PE file, use program resources; that's why they exist.


    MCM

    Leave a comment:


  • Mark Farrar
    replied
    ?

    so ....

    #Utility "some text here"

    You mean that this is for an external utility to read this line of text from the source code file *.bas ?

    I had the impression that the information was somehow encoded in the compliled *.exe or *.dll file. If that was the case, I was wondering how to read it? In case someone wanted to write a utility to access the imbedded string.

    Leave a comment:


  • Bernhard Fomm
    replied
    Ahhh...Thanks!

    Leave a comment:


  • Eric Pearson
    replied
    First came the #PBFORMS metastatement, which is used by the PB-Forms source-code generator system. #UTILITY is intended to be a generic version of the #PBFORMS metastatement, for use by external programs like source-code-lint detectors, spell-checkers, etc.

    -- Eric

    Leave a comment:


  • jcfuller
    replied
    Originally posted by Bernhard Fomm View Post
    What can the new statement "#UTILITY"? What's the point?
    It's for third party tools.
    The compiler ignores everything on the line(s)
    I'm using it to describe Class Information to be read by a class browser

    James

    Leave a comment:


  • Bernhard Fomm
    started a topic #utility

    #utility

    What can the new statement "#UTILITY"? What's the point?
Working...
X