axiom-developer
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

## Re: [Axiom-developer] Curiosities with Axiom mathematical structures

 From: Ralf Hemmecke Subject: Re: [Axiom-developer] Curiosities with Axiom mathematical structures Date: Thu, 02 Mar 2006 23:51:44 +0100 User-agent: Thunderbird 1.5 (X11/20051201)

```Hi Francois,

if you insist on using SPAD for new code I cannot help.

On 03/01/2006 09:56 AM, Francois Maltey wrote:
```
Hello, It seems I can define binary operator with the underscore _ in any *.spad file.
```
```
In Aldor you don't need the underscore. An underscore is only needed if you want to write a function "mod_*" because if you write "mod*" that would mean "mod" "*" (two tokens).
```
```
```Are the name of the operator are fixed in the compiler or not ?
```
```
```
They are fixed Aldor. You find a list of them in the Aldor User Guide Section 4.7.1. (http://www.aldor.org/docs/HTML/index.html)
```
```
```Can I define my own new operator azerty or not ?
```
```
If you mean "binary infix operator" then the answer is NO.

```
```  for computing 1 azerty 2 azerty 3 azerty 4 without problem.
```
```
```
```Can I define my own factorial with ! or not ?
```
```
I haven't seen postfix operators in Aldor.

```
```  the ! operator is a postfix one.     3!
but the - operator is a prefix one. -3
```
```
```
```Why are there 2 underscore in _/_\ in boolean.spad ?
```
```
```
Simple. SPAD does not consider \ and / to be letters that can be used in an identifier. By escaping them with an _ you basically turn them into "nice" letters.
```

```
```Logic: Category == BasicType with
_~:        % -> %
++ ~(x) returns the logical complement of x.
_/_\:       (%, %) -> %
++ \spadignore { /\ }returns the logical `meet', e.g. `and'.
_\_/:       (%, %) -> %
++ \spadignore{ \/ } returns the logical `join', e.g. `or'.

Can I do this in a *.input file for the interpreter ?
```
```
No idea.

```
```Can I fix a priority for each operator ?
```
```
No. That is fixed in Aldor.

Ralf

```

reply via email to

 [Prev in Thread] Current Thread [Next in Thread]