[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Axiom-developer] Unions in Spad
From: |
Ralf Hemmecke |
Subject: |
Re: [Axiom-developer] Unions in Spad |
Date: |
Mon, 09 Jul 2007 18:26:43 +0200 |
User-agent: |
Thunderbird 2.0.0.4 (X11/20070604) |
So really in Aldor when writes
Union(x:Integer, y:String)
one is using the same conventions. So as Waldek implied, the fact that
Aldor currently does not allow
Union(Integer, String)
is not really a syntactic issue but rather a semantic one.
Unfortunately, the Aldor mailing list is dead. --- No replies to my
recent question.
http://www.aldor.org/pipermail/aldor-l/2007-July/000643.html
Anyway, I would not say that Aldor does not allow
"Union(Integer,String)". No hint in the AUG, but look at the error
message given in
http://lists.nongnu.org/archive/html/axiom-developer/2007-07/msg00181.html
If you rewrite this program to
U == Union(machInt: MachineInteger, sStr: String);
(just change this line) and then look at the error message.
woodpecker:~/scratch>aldor -laldor -fx aaa.as
"aaa.as", line 13: if u case MachineInteger then {
..................^
[L13 C19] #1 (Error) Argument 2 of `case' did not match any possible
parameter type.
The rejected type is Join(
PrimitiveType with
....
Expected one of:
-- Enumeration(machInt: Type)
-- Enumeration(sStr: Type)
It looks as if one also could do
if u case MachineInteger then ...
with the current Aldor compiler, I just don't know how to type
"MachineInteger" since the compiler immediately takes the *type*
MachineInteger and not the *tag* MachineInteger.
Anyway, that usage of MachineInteger is not specified in the AUG so
maybe one better does not use it that way.
Ralf
- [Axiom-developer] Re: [Aldor-l] rep, per, Rep in SPAD/Aldor, (continued)
Re: [Axiom-developer] Unions in Spad, Bill Page, 2007/07/08
Re: [Axiom-developer] Unions in Spad, Waldek Hebisch, 2007/07/09
Re: [Axiom-developer] Unions in Spad, Bill Page, 2007/07/09
Re: [Axiom-developer] Unions in Spad,
Ralf Hemmecke <=
Re: [Axiom-developer] Unions in Spad, Bill Page, 2007/07/09
Re: [Axiom-developer] Unions in Spad, Bill Page, 2007/07/09
Re: [Axiom-developer] Unions in Spad, Ralf Hemmecke, 2007/07/09
Re: [Axiom-developer] Unions in Spad, Bill Page, 2007/07/09
Re: [Axiom-developer] Unions in Spad, Ralf Hemmecke, 2007/07/09
Re: [Axiom-developer] Unions in Spad, Stephen Wilson, 2007/07/11
Re: [Axiom-developer] Unions in Spad, Gabriel Dos Reis, 2007/07/11
Re: [Axiom-developer] Unions in Spad, Stephen Wilson, 2007/07/11
Re: [Axiom-developer] Unions in Spad, Gabriel Dos Reis, 2007/07/11
Re: [Axiom-developer] Unions in Spad, Stephen Wilson, 2007/07/11