w3adc: Update to allow multiple switches on single line #3
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There are several cases in the WW3 code base where it would be advantageous for the pre-processor (w3adc) to allow multiple switches on one line. I.e. to only include a line of code if all switches for that line are specified in the switch file.
This change updates w3adc.f to handle multiple switches on a single line both in the include files (if any) and the primary source file.
Each switch should start with the usual
!/
and be chained together with no spaces between, or optionally an extra/
, e.g. the following lines are equivalent and will only be activated if both theOMPH
andT1
switches are set in theswitch
file:The switch section is assumed to be complete when no more
!/
characters can be read (or!/
is followed by a space).Any amount of switches can be added to a line (up to the maximum line length of 143 characters defined in
w3adc
).