"Serge D. Mechveliani" <[email protected]> writes: | People, | can you, please, answer the following beginner questions about the Spad | language and library? | | escape() Instead of '`' it shows the underscore: '_' | -------- (in fricas-1.1.5). | Is this all right?
espace designates the escape character in the Spad language. | Defining a constant | ------------------- | I define parentheses : () -> Set Character | parentheses() == ... | in a package. | I need to apply it not as, for example, ps := f parentheses() | but as ps := f parentheses, | where parentheses : Set Caracter. | But this latter does work. How to arrange this? It works in OpenAxiom. For other AXIOM flavours, you might want to use parentheses: constant -> Set Character But, I seem to remember that they are still lagging proper support for constants whose types are not '%'. | | I tried parentheses : Set Character | parentheses := ... | ... | ps := parentheses, | but it does not work. that would be the syntax for defining a variable. But there is no support for exporting variables -- the best approximation is that you use a unary function wrapper. | | Using type (domain) synomym | --------------------------- | I tried to declare in my package | | ... package ... with | Lexeme : SetCategory | spanStr : (Character -> Boolean, String) -> Product(Lexeme, String) | == | add | Lexeme : SetCategory := String | ... | < a code using the Lexeme type as String > | | and had difficulties. Finally I replaced Lexeme with String. | What is your advice on this? Spad lacks good support for Sigma-types, so you need to define Lexeme as a standalone functor in itself, outside the definition of your package. -- You received this message because you are subscribed to the Google Groups "FriCAS - computer algebra system" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/fricas-devel?hl=en.
