[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Axiom-math] Axiom: Installing Aldor
From: |
Ralf Hemmecke |
Subject: |
Re: [Axiom-math] Axiom: Installing Aldor |
Date: |
Sat, 17 Nov 2007 18:21:54 +0100 |
User-agent: |
Thunderbird 2.0.0.9 (X11/20071031) |
With this version I am getting the following error:
Well, it's a warning...
cfrangos/axiom> aldor -Fx -laldor aldortest.as
"aldortest.as", line 10: nfact :Integer;
^
[L10 C1] #1 (Warning) Suspicious `:'. Do you mean `local' or `default'?
You actually write one of the following.
---BEGIN aldortest.as
#include "aldor"
#include "aldorio"
import from Integer;
testfact(imax:Integer):Integer == {
#if Variant1
default nfact :Integer;
nfact := 1;
#elseif Variant2
local nfact: Integer := 1;
#elseif Variant3
nfact: Integer := 1;
#else
nfact := 1;
#endif
for i in 1..imax repeat nfact := nfact*i;
return(nfact);
}
n := 100;
xfact := testfact(n);
stdout << n << " factorial is :" << xfact << newline ;
---END aldortest.as
Compile with
0~> aldor -fx -laldor aldortest.as
1~> aldor -fx -laldor -DVariant1 aldortest.as
2~> aldor -fx -laldor -DVariant2 aldortest.as
3~> aldor -fx -laldor -DVariant3 aldortest.as
They are all equivalent in *this* instance.
But as you see, you don't need to help the compiler with declaring a
"default" type for the variable. Since only Integer is in scope. The 1
can only be of that type so the compiler can infer the type of nfact
(lhs of "nfact:=1").
All of the variants declare a local variable, since you first assign to
it and that lets the compiler make it local.
As for the other problem... the line
/usr/lib64/gcc/x86_64-suse-linux/4.1.0/../../../../x86_64-suse-linux/bin/ld:
skipping incompatible /home/apps/aldornew/aldor/linux/1.1.0/lib/libaldor.a
when searching for -laldor
says exactly what you should do... namely delete the .a libraries on the
64 bit machine and recompile them yourself. The .a libraries are machine
dependent, so if you use a .a file from another machine, that cannot work.
Ralf
- [Axiom-math] Axiom: Printing multiple variables in axiom., (continued)
- [Axiom-math] Axiom: Installing Aldor, Constantine Frangos, 2007/11/13
- Re: [Axiom-math] Axiom: Installing Aldor, Ralf Hemmecke, 2007/11/13
- [Axiom-math] Aldor: Installing Aldor, Constantine Frangos, 2007/11/13
- Re: [Axiom-math] Aldor: Installing Aldor, Bill Page, 2007/11/13
- Re: [Axiom-math] Aldor: Installing Aldor, Ralf Hemmecke, 2007/11/14
- [Axiom-math] Aldor: Installing Aldor, Constantine Frangos, 2007/11/14
- [Axiom-math] Re: Aldor: Installing Aldor, Bill Page, 2007/11/14
- [Axiom-math] Axiom: Installing Aldor, Constantine Frangos, 2007/11/17
- Re: [Axiom-math] Axiom: Installing Aldor,
Ralf Hemmecke <=
- Re: [Axiom-math] Axiom: Installing Aldor, Constantine Frangos, 2007/11/24
- Re: [Axiom-math] Aldor: Installing Aldor, Constantine Frangos, 2007/11/14
- Re: [Axiom-math] Aldor: Installing Aldor, Gabriel Dos Reis, 2007/11/14
- Re: [Axiom-math] Aldor: Installing Aldor, Ralf Hemmecke, 2007/11/15
- [Axiom-math] Re: Axiom: Installing Aldor, Bill Page, 2007/11/13
- [Axiom-math] Re: Axiom: Installing Aldor, Martin Rubey, 2007/11/13
Re: [Axiom-math] Axiom: Printing multiple variables in axiom., Bill Page, 2007/11/09