Pow operator precedence

Stewart Gordon smjg_1998 at yahoo.com
Fri Jan 13 15:30:47 PST 2012


On 13/01/2012 19:24, Grue wrote:
<snip>
> Beware... your statement has awoken an "Ancient Forum Lurker"! ;)
> 1. Google -5^2, result: -(5^2) = -25
> 2. Start ancient TI graphing calculator(which by the way has a special unary (-) minus
> operator).
> -5^2 = -25
> -5*²* = -25
<snip>

And probably most BASICs.  Just checked VBA and Spectrum BASIC.  Once upon a time I would 
have had QBasic to test on as well.

Stewart.


More information about the Digitalmars-d mailing list