Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

Detect Windows or Qwin program

BearofLittleBrain1
New Contributor I
342 Views

I have two almost identical routines that differ by only one statement, depending on whether the program in which they run is Windows or Qwin.  Is it possible to detect which it is when executing?  Then I could combine the two routines with an IF statement and avoid confusion.

BearofLittleBrain

0 Kudos
2 Replies
andrew_4619
Honored Contributor II
311 Views

Surely at compile time you know what the application type is anyway so you can set your own variable to differentiate?

0 Kudos
BearofLittleBrain1
New Contributor I
281 Views

Andrew,

You are, of course, completely right.  I realised that is how to do it about a minute after pressing the "Post" button.

Regards

BearofLittleBrain

0 Kudos
Reply