|
From: | Francois Maltey |
Subject: | Re: [Axiom-math] if-then-else: what is wrong? |
Date: | 19 Jan 2006 21:23:24 +0100 |
User-agent: | Gnus/5.09 (Gnus v5.9.0) Emacs/21.4 |
Hello Fabio and Bill ! the do command can help : do if i > 0 then output("positive") else output("nonpositive") But there is a new problem : do is the only (?) axiom command which has et void result. You can use a test inside a function : the result of the test is 1 or -1. ... if i > 0 then 1 else -1 ... But if you use the do command you can't get the result of the test. So you can't use : do if i > 0 then 1 else -1 Is it possible to have a sharper interpreter in a futur version. I really like language that have a really short grammar. Bill do I write a lot of error ? Have a good day ! François : Today I improve my axiom-run emacs mode.
[Prev in Thread] | Current Thread | [Next in Thread] |