Ralf Hemmecke writes: > > > (7) I tried using a list to return multiple variables from a > > > function. However, this turns out to be of type any. These variables > > > can be displayed but not used in operations any further. This means > > > that you have to remember the types of each variable in the list. > > > Then, manually in the calling function extract and explicitly typecast > > > each variable in the returned list. Is there an easier way of doing > > > this ?? > > I am somehow surprised that Axiom cannot work with multivalues. > > (1) -> foo(a: Integer, b: Integer): (String, Integer) == ("sum", a+b); > > The constructor Tuple takes 1 argument and you have given 2 . > (1) -> foo: (Integer, Integer) -> (String, Integer) > > The constructor Tuple takes 1 argument and you have given 2 . >
In axiom you need to use records: foo(a: Integer, b: Integer): Record(s: String, r:Integer) == ("sum", a+b); Martin (Although I'm completely convinced that Aldor is superiour) _______________________________________________ Axiom-developer mailing list Axiom-developer@nongnu.org http://lists.nongnu.org/mailman/listinfo/axiom-developer