[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [Axiom-mail] Declare variable type within function
From: |
Angelos Mantzaflaris |
Subject: |
RE: [Axiom-mail] Declare variable type within function |
Date: |
Tue, 18 Mar 2008 13:19:06 +0200 |
Thank you for your answers everyone.
>Axiom is not complaining, it is only giving you a warning that it
>cannot compile what you wrote (for the reason it gave) but it still
>might be able to interpret it - and does. Is there a reason why you do
>not want this to happen?
Well it just seemed strange to me since it will compile it if I do the trick
I told you. After all, compiling is better than interpreting, right?
Another reason is that If I explicitly define a local variable type this
saves me from having to convert the right side of some assignments inside
the code, cause otherwise I won't get the desired output type (it won't
auto-convert to left hand type).
So my thought is: " Cannot compile conversion for types involving local
variables": Why not? Since you can do it if I do the trick!
To be more specific, I would like to have a function that works with
polynomials, for example the normalForm function. This function works with
POLY FRAC INT, Univariate, DMP's, HDMP's and so on. If I want to write a
script that implements this function and just make it work with polynomials,
I should leave it I/O undeclared.
Thank you again,
Angelos