What can the new statement "#UTILITY"? What's the point?
Announcement
Collapse
No announcement yet.
#utility
Collapse
X
-
-
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"Not my circus, not my monkeys."
Comment
-
?
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.
Comment
-
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.
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.
MCMMichael Mattias
Tal Systems (retired)
Port Washington WI USA
[email protected]
http://www.talsystems.com
Comment
-
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.
Comment
-
Comment