Answer the question
In order to leave comments, you need to log in
Is there an analogue of define in Delphi from C++?
Need define from C++ to improve the readability of the code.
Answer the question
In order to leave comments, you need to log in
Reserved constants:
True (Boolean type);
False (Boolean type);
MaxInt(type Integer);
MaxLongint (type Integer).
Using these constants can be dangerous if you're working with someone else's code. This is due to the fact that these constants can be redefined. Remember the old joke?
So, the same thing can be done in Delphi.
const
False{: Boolean} = Boolean( -1 );
True{: Boolean} = Boolean( 0 );
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question