View previous topic :: View next topic |
Author |
Message |
wahorger
Joined: 13 Oct 2014 Posts: 1217 Location: Morrison, CO, USA
|
Posted: Thu Dec 03, 2020 10:25 pm Post subject: Predefined Variables |
|
|
I like that _WIN32 and _WIN64 are predefined variables. I use VPARAM to create predefined variables for specific purposes in my code.
I was curious: Does a list of all available predefined variables exist?
I know whether your are doing a /CHECKMATE or a /RELEASE compilation is useful as well. FYI: I am struggling with ALLOCATE statements that are interfering with /CHECKMATE, but are perfectly fine with /RELEASE. I have a technique to obviate the issue so I can use the great /CHECKMATE features during development, but it requires a predefined variable, either one that is already existing or that I would create and use in the command line.
If one already exists, I'd prefer to use that! |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7928 Location: Salford, UK
|
Posted: Fri Dec 04, 2020 8:43 am Post subject: |
|
|
Here is a list of predefined values:
_WIN32
_WIN64
_CLR
_DEBUG
_FTN95_VER
_CLR indicates .NET and _FTN95_VER is 870 for v8.70.
_DEBUG corresponds to /DEBUG which is implied in /CHECK etc.
Now /CHECK implies /DEBUG, /UNDEF imples /CHECK, /FULL_UNDEF adds character variables to /UNDEF and /CHECKMATE is the same as /FULL_UNDEF.
So /CHECKMATE gives you everything and I guess we could add this to the list if it would be useful. Note, however, that all but _DEBUG are global whilst /DEBUG etc are allowed to change between subprogram units. |
|
Back to top |
|
|
wahorger
Joined: 13 Oct 2014 Posts: 1217 Location: Morrison, CO, USA
|
Posted: Fri Dec 04, 2020 7:33 pm Post subject: |
|
|
Paul, this is great, and thanks for the time!
To clarify: If I need to distinguish between /RELEASE and /CHECKMATE, I can do #ifdef _DEBUG which would be defined if I have compiled with the command line /CHECKMATE, correct? I think that is exactly what you said.
For what I intend to use it for, it matters not whether /UNDEF or /FULL_UNDEF. I'm intending to conditionally compile units that don't seem to work under /CHECKMATE but do under /RELEASE, making the small coding changes so I can use the checking features effectively.
Bill |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7928 Location: Salford, UK
|
Posted: Fri Dec 04, 2020 9:19 pm Post subject: |
|
|
Yes _DEBUG should work for you. |
|
Back to top |
|
|
|