Re: Can someone explain this?
Re: Can someone explain this?
- Subject: Re: Can someone explain this?
- From: Philip Aker <email@hidden>
- Date: Sun, 15 Mar 2009 03:47:28 -0700
On 2009-03-14, at 13:48:27, Mark J. Reed wrote:
As I said, if you use pow(), there's no ambiguity. -pow(3,2) is
distinct from pow(-3,2). With the operator form, it just depends on
how the language ranks the precedence of the exponentiation operator
with respect to unary minus.
I actually was only showing how to make the call to Tcl (8.4) in a
slightly more convenient form in order to augment the impressive show
of polyglotism ever so slightly. I had no intention of entering the
heated math debate on any side.
$ echo 'puts [expr -3**2]' | tclsh # requires TCL 8.5, no **
operator in <= 8.4
For those sufferin' with Tcl 8.4 it's:
$ tclsh <<< 'puts [expr pow(-3,2)];';
Philip Aker
echo email@hidden@nl | tr a-z@. p-za-o.@
Democracy: Two wolves and a sheep voting on lunch.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden