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

Re: CENTAUR





In article <29376@sophia.inria.fr>, durrieu@tls-cs.cert.fr (Guy Durrieu) writes:
=>  I encountered some difficulties in trying to process, at VTP level, atoms
=> representing numbers as numbers (i.e. to do arithmetic operations on them).
=> 

Okay, one quick question to start off: 
	are you building the tree using a Metal generated parser!?
If so, then did you say that the atomic operator was "implemented as"?
Integer, bignum, etc.

Both the integer and bignum refer to integer values.  Real numbers are
typically "implemented as string".   (Also note that in SDF all atomic
operators have string values.)


=> In particular, real numbers don't seem to work (values such 213.4 ...) ; at
=> least, they do not seem to work under the same method as integers. Am I right
=> or is there a special method for processing real numbers?
=>

In lelisp there are 5 types of arithemetic to handle floats, integers,
extended integers, generic, or mixed operations (Cf. Chap 4 of the LeLisp Manual).
Thus, for example, you have "fadd", "add", "ex+", "+", and "plus" to do addition.
Note that using + you don't need to know the argument types.

Without more specific info (how you are constructing the tree, how you are 
processing them once constructed, etc.), i can't really help more.


	--janet