slang-users mailing list

[2000 Date Index] [2000 Thread Index] [Other years]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]

Re: foreign references and operator overloading


John E. Davis wrote:
> 
> Dave Greve <dagreve@xxxxxxxxx> wrote:
> >  1) I don't want to expose the entrails of the QDD
> >     data structure to the s-lang user.  Rather, the
> >     user will see "references" to QDD objects which
> >     can be passed around, stored in s-lang variables,
> >     and manipulated using intrinsic functions.
> 
> I recommend that you look at slstdio.c to see how File_Type objects
> have been implemented.

  I notice, however, that there is already a SLANG_FILE_PTR_TYPE
defined in slang.h that is used in the creation of File_Type objects.
If I am adding new types, do I just randomly choose a new SLANG_XXX_TYPE
from the available values and use that?  Or is there another more
standard way of extending the "type" system?

> Currently there is no way to have bignum
> literals without hacking the slang source.  

  I figured that literals would be difficult, if not impossible,
for the casual user (me).

> The best you can do with
> the existing form of the library is to create some function, say
> bignum, that returns a bignum object, e.g.,
> 
>      x = bignum ("123456789012345678901234567");

  That is what I will do, if need be.

> Once you have created the bignum object, you can define binary
> operations between it and the other integers.  See
> slang/src/slcmplex.c for an example of the technique.

  Yes, this is what confused me.  The README file in the
/demo directory calls out a "complex.c" file .. which has
apparently been moved into the main source files and
renamed to slcmplex.c.

Thanks,

Dave


[2000 date index] [2000 thread index]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]