[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Axiom-math] if-expression and variables
From: |
Bill Page |
Subject: |
Re: [Axiom-math] if-expression and variables |
Date: |
Tue, 3 May 2011 00:17:47 -0400 |
Oops, I forgot that 'parse' was never implemented in the InputForm
domain in the original Axiom. In this case use:
parse(s:String):InputForm == ncParseFromString(s)$Lisp
Regards,
Bill Page.
On Mon, May 2, 2011 at 11:57 PM, Bill Page <address@hidden> wrote:
>
> Now the function that Stefan has in mind can be written in a fairly
> transparent manner.
>
> (3) -> ex:InputForm := parse("if x<10 then 2*x else 5*x^2"); expr ex
>
> (3)
> if x < 10
> then 2x
> 2
> else 5x
> Type: OutputForm
>
> The function 'parse' returns an unevaluated input form for the
> expression inside "...". The function 'expr' prints this in a readable
> manner. (InputForm is displayed in this form by default in OpenAxiom.)
>
Re: [Axiom-math] if-expression and variables, William Sit, 2011/05/02
Re: [Axiom-math] if-expression and variables, Ralf Hemmecke, 2011/05/03