A question about IF

Dear Professor jpfeifer,
I have a question about Macro-processor statement " IF". As you mentioned in this post [If statement) , I would like to have a model where endogenously uses either one or the other equation depending on the value of the endogenouse variable in that period. You commented that this is a different issue than constructing a mod-file. But I would like to know that how we can deal with this issue?
@#if model_variable <= value


Dear Leo,

You cannot do that with the macro language because these conditions are evaluated before the model is actually analyzed by Dynare’s preprocessor and run by Matlab/Octave. The condition you have in mind should ve evaluated at run time. To do that see this post.