Unfortunately I don't have an answer for you but, I have a question instead. Do you happen to have a link to a page that documents all the functions that can be called at compile time ?
I ask for two reasons, I didn't know that sizeof could be used in compiler directives.
A page that documents all the functions that can be used in compiler directive expressions would be very nice. If you happen to know of one, please do share.
@PascalDragon: useful link, thanks. But can you answer my question? Is it possible to format the content of the error message?
Is there any way to use SIZEOF and use the received value to format the message body?
How about this (https://www.freepascal.org/docs-html/current/prog/progsu127.html#x140-1410002.4.1) one? ;) (Though the arithmetic operators aren't documented (essentially the whole set is supported), so for those a bug report should be filed)That is really nice, thank you. I have to say, not an easy page to find.
Also, I have not been able to find an "equivalent" in the FPC (pdf) documentation.
It's the Programmer's Guide, so prog.pdf. Chapter 2, section 2.4 for FPC 3.2.0You're right!. It's right there. Thank you for pointing that out.
How about this (https://www.freepascal.org/docs-html/current/prog/progsu127.html#x140-1410002.4.1) one? ;) (Though the arithmetic operators aren't documented (essentially the whole set is supported), so for those a bug report should be filed)
@PascalDragon: useful link, thanks. But can you answer my question? Is it possible to format the content of the error message?
Also, I have not been able to find an "equivalent" in the FPC (pdf) documentation.
The preprocessor related parts are documented in the programmer's guide, cause it's strictly not part of the language.
Does that mean that the compiler could invoke a different program as its front-end preprocessor? >:-)
Does that mean that the compiler could invoke a different program as its front-end preprocessor? >:-)
Read what I wrote: I said that the preprocessor is not part of the language. It is however an intrinsic part of the compiler and not changeable.
Having said which, such a thing might be useful since it would allow a standard response to suggestions like "Please can we have braces as block markers": "Sure, write a suitable preprocessor.".
Having said which, such a thing might be useful since it would allow a standard response to suggestions like "Please can we have braces as block markers": "Sure, write a suitable preprocessor.".
No. (You asked for it :P )