Andrew, re...,
> The GNU C++ compiler has a built-in extension for MIN and MAX that uses <?
> and >? respectively as the binary operators. Although I'd prefer that we
> stick as close as possiblt to the standard C operators and function
> syntax, if a variable-length MIN() and MAX() can't easily be developed
> it's probably better to regard g++ as a sort of standard and re-use their
> operators.
I think <? would be valuable even if min(a,b,c,d,...) existed, because in some
cases using the operator would yield a clearer expression. But I certainly
agree that sticking to standards is the way to go. Otherwise we might get more
functions like "loge" (should be "ln"), and operators like "#" (should be "!="
or "<>").
To this end, does anyone happen to know the precedence and associativity of these
operators? I.e.,
does a + b <? c mean (a + b) <? c or a + (b <? c)
does a <? b <? c mean (a <? b) <? c or a <? (b <? c)
does a * b <? c mean (a * b) <? c or a * (b <? c)
etc. I haven't been able to find this information online.
--
Tim Mooney ([email protected]; 630-252-5417)
Advanced Photon Source
APS Operations Division
Beamline Controls & Data Acquisition Group
- Replies:
- Re: Long expressions using MAX and MIN in CALC fields Noboru Yamamoto
- Re: Long expressions using MAX and MIN in CALC fields Andrew Johnson
- References:
- Long expressions using MAX and MIN in CALC fields Redman, Russell O.
- Re: Long expressions using MAX and MIN in CALC fields Andrew Johnson
- Navigate by Date:
- Prev:
RE: Long expressions using MAX and MIN in CALC fields Redman, Russell O.
- Next:
Re: Long expressions using MAX and MIN in CALC fields Tim Mooney
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
<2003>
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
- Navigate by Thread:
- Prev:
Re: Long expressions using MAX and MIN in CALC fields Andrew Johnson
- Next:
Re: Long expressions using MAX and MIN in CALC fields Noboru Yamamoto
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
<2003>
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
|