axiom-developer
[Top][All Lists]
Advanced

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

Re: [Axiom-developer] No-String


From: Ralf Hemmecke
Subject: Re: [Axiom-developer] No-String
Date: Sun, 10 Dec 2006 19:23:22 +0100 (MET)
User-agent: Thunderbird 1.5.0.8 (X11/20061025)

Dear Greg,

> )lisp (setq |$String| '(|MyString|))

Wonderful. Thank you. That seems to do what I want. I don't care much about the SPAD compiler. And in the interpreter I want to see only MyString anyway, because it actually is String only that I have "extend"ed its functionality.

(1) -> )lib cscombinatversion csaxcompat
(1) -> )lisp (setq |$String| '(|ACString|))
(1) ->
Value = (|ACString|)
)lisp (setq |$String| '(|MyString|))
(1) -> l: ACList(ACString) := ["a", "b"]
   (1)  ["a","b"]
                                Type: ACList ACString

Of course, I have to test that more carefully.

What are the corresponding variables for

SingleInteger
Character
List
Set

On 12/10/2006 05:47 PM, Vanuxem Gregory wrote:
Hello Ralf,

The String type and some others are "primitive" types. All is done by
the interpreter so you can not modify this without modifying the
interpreter.

That's bad. :-(

The interpreter has to know some of theses primitive types
when it parses and interprets what you're typing. For example if you
type '1.3' (integer dot integer) it returns by default a Float but this
string is first tokenized and after "Floatized" by the interpreter (it
calls float$Float by default).

Clear, but I like more that way the Aldor compiler handles that. The only knowledge it has is that for something that looks like a float, integer or a string it has to call functions

float:   Literal -> %
integer: Literal -> %
string:  Literal -> %

from whatever domains are currently in scope.

So my understanding was that if I expose MyString and unexpose String, everything should be fine. Both have a string function but only the one from MyString is now visible to the interpreter. That would be nice in Axiom.

As far as I know only one default type can be modified, the default type
for floating point numbers. If you issue in the interpreter:

)boot $useBFasDefault:=false

or in Lisp

)lisp (setq |$useBFasDefault| nil)

This one I don't understand. But since I am not interested in modifying anything connected to floats, there is no need to explain.

Best regards
Ralf




reply via email to

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