I’m trying to simulate a multi-sector model with search frictions and running into problems with the macro preprocessor when I try to create an integer value for a conditional test using loop indices. Code like this:
@#for l in 0:JJ
@#for j in 1:JJ
@#if (@{l} == @{j} || @{l}==0)
Equation
@#else
Equation
@#endif
@#endfor
@#endfor
Gives me the error
[quote]ERROR in macro-processor: occbc.mod:66.9: Macro lexer error: ‘@’
[/quote]
Should this operation be kosher, or does it make sense that I’d have trouble?
In the attached code, the problem first occurs on line 66, though I use a similar test elsewhere and get the same error.
Thanks very much,
David
occbc.mod (3.09 KB)