Gabriel and Bill discuss about : draw(sin(x), x=1..10, title=="sin function")
I [Bill] realized the interpreter does something rather clever but probably quite unexpected. I don't find it so clever. I understand only after your mails that this == isn't the definition of the function title, but a trick about lists of arguments. And [Gaby] I don't like it : The problem is that SPAD does not provide built-in support for calling functions with optional arguments. I don't like this ==, too. Axiom operates over one list of arguments when there are a lot of arguments, try : concat ([1,2], [3,4]) or concat [[1,2],[3,4],[5,6]]. The second concat is reduce (concat, L, []). It may be useful to have a lot of functions as this one : min / max / horizConcat / vertConcat / + / * and remain reduce only for the rare cases. draw(sin(x), x=1..10, title=="sin function") all theses optional parameters might occur in a list : draw(sin(x), x=1..10, [title="sin function"]), draw(sin(x), x=1..10, []) or draw(sin(x), x=1..10, [title="sin function", numberOfPoints = 100, drawAxes=false, viewWindows=[-%pi..%pi,-1..1]]) The type of this list contains terms of a new domain OptionalParameters, described by : identificator = an Any object, it looks like other cas... F. ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php _______________________________________________ open-axiom-devel mailing list open-axiom-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/open-axiom-devel