Version compiler control directive?

Just wondering if there is a compiler control directive that allows for different code for different versions of Gauss. Something like

#ifversion20;[Commands for v20 and above]#else;[Commands for v19 and below]#endif;

If not, how can I best write code that 1) uses version-20 specific commands and 2) also runs on previous versions?

Thank you, Tue

1 Answer



0



Yes, you can use #ifminkernelversion for this purpose. It takes an argument with the version number. Here is a simple example:

#ifminkernelversion(20)
    print "using version 20 or newer";
#else
    print "older version";
#endif

aptech

1,773

Your Answer

1 Answer

0

Yes, you can use #ifminkernelversion for this purpose. It takes an argument with the version number. Here is a simple example:

#ifminkernelversion(20)
    print "using version 20 or newer";
#else
    print "older version";
#endif


You must login to post answers.

Have a Specific Question?

Get a real answer from a real person

Need Support?

Get help from our friendly experts.