Hi all,
I need some help. I am programming in Meta, and ran into an
interesting bug.
I thought Meta was like Lisp, in that there are no types (eg int,
double ...).
But, I guess I was wrong.
Meta is built on Microsoft's .NET (I don't know if that has anything
to do with it, but I thought I'd mention it).
Anyway, I did a simple operation:
[/ 50 10]
and I tried to pass that result to a funtion that takes a number as a
counter.
It gave me an arguement type exception error, because
[/ 50 10] returned a double.
This is really confusing me. If you have any advice for me, like what
I can do to convert a double, or how to get around so that my function
accepts a double, that would be great.
Thanks,
AWS
PS. Please respond by e-mail AND by posting on the group. Thank you.
·······@northwestern.edu (AWS) wrote in message news:<····························@posting.google.com>...
> Hi all,
>
> I need some help. I am programming in Meta, and ran into an
> interesting bug.
> I thought Meta was like Lisp, in that there are no types (eg int,
> double ...).
>
> But, I guess I was wrong.
In more ways than one perhaps, since Lisp has types. Like the function
you are trying to use in Meta which rejects a floating point value
because it expects an integer, Lisp functions can do the same thing.
Look:
(evenp 1.1) ;; is 1.1 even?
--> <ERROR> ;; 1.1 is not an integer.
> This is really confusing me. If you have any advice for me, like what
> I can do to convert a double, or how to get around so that my function
> accepts a double, that would be great.
Maybe this Meta has a reference manual? Or, failing that, source code?
On Wed, 10 Mar 2004 08:56:25 -0800, Kaz Kylheku wrote:
> Maybe this Meta has a reference manual? Or, failing that, source code?
If it does, I'm sure there must be something in the index under "type
conversion" or "coercion". You might start there...
faa