Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2007
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2007

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: reverse polish notation

  • To: mathgroup at smc.vnet.net
  • Subject: [mg73099] Re: [mg73099] reverse polish notation
  • From: Andrzej Kozlowski <akoz at mimuw.edu.pl>
  • Date: Sat, 3 Feb 2007 04:04:04 -0500 (EST)
  • References: <200702021023.FAA08809@smc.vnet.net>

On 2 Feb 2007, at 11:23, cap'n rye wrote:

> Is there a way to extensively use postfix notation for input in
> Mathematica? I know you can enter F[x] as x//F, but I can't seem to
> make it work for multiple arguments. For example N[Sqrt[7]] can be
> input as 7//Sqrt//N, but I can't figure out how to input N[Sqrt[7],30]
> or even Plus[3,5]. Is this type of input not really supported? Is
> there a way to work around it? Thanks for your help.
>

The ony way I can see of doing this is by using Sequence:


Sequence[2,3]//Plus

5

which seems to defeat the purpose of doing it in the first place. But  
you can use infix form:

2~Plus~3

5

which has essenitlaly the same advantages.

Andrzje Kozlowski



  • Prev by Date: Re: file functions & FrontEnd`FileName
  • Next by Date: Re: graphing with dates and values
  • Previous by thread: reverse polish notation
  • Next by thread: Re: reverse polish notation