pragmas for expressions?

mgen bmeck at stedwards.edu
Wed Oct 22 09:35:05 PDT 2008


I have been hacking into the front end as of late and noticed that pragmas cannot be introduced as parts of expressions and instead must be used as a separated statements. My main concern here is sometimes I wish to set up a value that could be returned and used by the code at compile time; for example:

pragma(msg,"you do not have a version set up... please select unix, linux, windows, or mac by entering the name and pressing enter");
char[] response = pragma(readln);

which could ease the use of things especially build scripts having odd errors that could be corrected at compile time instead of having an entire rerun of the script.

All in all I was wondering what people thought of using pragmas inside of expressions?



More information about the Digitalmars-d mailing list