Hi,
A macro previously used with Unix C compiler is not compiling with MSDEV. Am I missing something obvious!> Here is the macro:
#define LIMITTO(lwlim, uplim, input1, output1) if (input1 > uplim) { output1 = input1 - (uplim-lwlim); } else if (input1 < lwlim) { output1 = input1 + (uplim-lwlim); } else { output1 = input1; }
using it, for example: LIMITTO(-180.0, 180.0, hset,hset);
causes compiler error C2105: '--' needs l-value
Thanks for your help.
A macro previously used with Unix C compiler is not compiling with MSDEV. Am I missing something obvious!> Here is the macro:
#define LIMITTO(lwlim, uplim, input1, output1) if (input1 > uplim) { output1 = input1 - (uplim-lwlim); } else if (input1 < lwlim) { output1 = input1 + (uplim-lwlim); } else { output1 = input1; }
using it, for example: LIMITTO(-180.0, 180.0, hset,hset);
causes compiler error C2105: '--' needs l-value
Thanks for your help.