W
Willem
io_x wrote:
) possible exst one define macro processor power enought for allow this:
) #MyDefine ?1<?2<?3 ?1<?2 && ?2<?3
)
) if(a<b<c && c>1) ....
) expanded to
) if(a<b && b<c && c>1) ....
) but that would break C language...
) Ciao
The C way to handle this would be to have a (varargs) function
increasing(...), which you would then call as increasing(a,b,c),
which returns true if a<b<c in the mathematical sense, and which
(listen very carefully) evaluates b only once.
SaSW, Willem
--
Disclaimer: I am in no way responsible for any of the statements
made in the above text. For all I know I might be
drugged or something..
No I'm not paranoid. You all think I'm paranoid, don't you !
#EOT
) possible exst one define macro processor power enought for allow this:
) #MyDefine ?1<?2<?3 ?1<?2 && ?2<?3
)
) if(a<b<c && c>1) ....
) expanded to
) if(a<b && b<c && c>1) ....
) but that would break C language...
) Ciao
The C way to handle this would be to have a (varargs) function
increasing(...), which you would then call as increasing(a,b,c),
which returns true if a<b<c in the mathematical sense, and which
(listen very carefully) evaluates b only once.
SaSW, Willem
--
Disclaimer: I am in no way responsible for any of the statements
made in the above text. For all I know I might be
drugged or something..
No I'm not paranoid. You all think I'm paranoid, don't you !
#EOT