Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

Create your datatypes

 [1/3] from: g:santilli:tiscalinet:it at: 4-Mar-2003 16:23


Hello all, wouldn't it be nice if we could write:
>> i: to complex! [0 1] >> a: to complex! 3 >> b: add a multiply a multiply i 3 >> form b
== "3 + 9i"
>> b/r
== 9.48683298050514
>> b/theta
== 71.565051177078
>> first b
== 3
>> second b
== 9 If you answered yes, then be happy! Now you can. :-) (The above is an actual console session.) I'm not yet releasing this, first because it is black magic ;-), second because it is far from being perfect. However, if anyone is interested in trying it and giving comments, just let me know. Regards, Gabriele. -- Gabriele Santilli <[g--santilli--tiscalinet--it]> -- REBOL Programmer Amigan -- AGI L'Aquila -- REB: http://web.tiscali.it/rebol/index.r

 [2/3] from: brian:hawley at: 5-Mar-2003 2:59


Hey Gabriele, I would certainly be interested in testing this. I have little need for complex numbers, but much need for the ability to extend the type system (or at least fake it). Send this my way! - Brian Hawley At 04:23 PM 3/4/03 +0100, you wrote:

 [3/3] from: antonr::iinet::net::au at: 6-Mar-2003 17:54


Gabriele, Yes, I want to see how you're doing it. Anton.