- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
*I am attempting to define a macro iidatac which is defined to be "iidata," (note the comma at the end) or in some cases "" (blank, nothing).
So on the command line I add:
/define:"iidatac=iidata,"
But then in the code I get this:
..\BlenderUnitOperation\krs_fortran_code\IsCacheableAssay.f90(1): error #5082: Syntax error, found IDENTIFIER 'IASSAYNUMBER' when expecting one of: ) ,
logical function IsCacheableAssay (iidatac iAssayNumber)
--------------------------------------------------^
Why? I expect the line "logical function IsCacheableAssay (iidatac iAssayNumber)" to become "logical function IsCacheableAssay (iidata, iAssayNumber)"
The manual does not contain much explanation of these subtleties...
Please help!
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hmm if a preprocess it with /E, then I see the correct substitution. So why is the compiler complaining then?
I also need to use this macro:
/define:"iidatap=iidata%"
But when I preprocess the file, the % seems to disappear?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am using:
Intel(R) Visual Fortran Intel(R) 64 Compiler for applications running on Intel(R) 64, Version 19.0.5.281 Build 20190815
Copyright (C) 1985-2019 Intel Corporation. All rights reserved.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ok, it looks like you need /fpp to get it to process the macros.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
And for the % to work, you need %%% if it is inside a makefile. I am not a fan of macros, but in some cases they are necessary.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page