forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Predefined Variables

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support
View previous topic :: View next topic  
Author Message
wahorger



Joined: 13 Oct 2014
Posts: 960
Location: Morrison, CO, USA

PostPosted: Thu Dec 03, 2020 10:25 pm    Post subject: Predefined Variables Reply with quote

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
View user's profile Send private message Visit poster's website
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 6836
Location: Salford, UK

PostPosted: Fri Dec 04, 2020 8:43 am    Post subject: Reply with quote

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
View user's profile Send private message AIM Address
wahorger



Joined: 13 Oct 2014
Posts: 960
Location: Morrison, CO, USA

PostPosted: Fri Dec 04, 2020 7:33 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 6836
Location: Salford, UK

PostPosted: Fri Dec 04, 2020 9:19 pm    Post subject: Reply with quote

Yes _DEBUG should work for you.
Back to top
View user's profile Send private message AIM Address
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group