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

[REBOL] Re: percent! - new datatype request

From: robbo1mark:aol at: 9-Jun-2002 15:03

In a message dated 6/7/2002 3:20:21 PM GMT Daylight Time, [carl--cybercraft--co--nz] writes:
> Why we're on the subject of new datatypes, what others are needed? > Degrees (and minutes) perhaps?
How about these; complex! -1.234+567i ; complex numbers ratio! 2/3 ; fractions co-ord! 2.34x1.23 ; co-ordinate - more precise than pair! octal! 377oct ; octal numbers - integers hex! FFFFhex ; hexadecimal numbers - integers binary! 101010bin ; binary numbers - integers note current REBOL binary is actually a binary-string! and not a numeric value stack! s[ 1 2 3 4 ] ; a stack block! which grows from bottom up and for which insert is quasi-elementary - really the opposite of a block! ie a reverse block!
>> make stack! [ 4 3 2 1 ]
== #[stack! [1 2 3 4]] unicode-char! #'a' ; utf unicode two byte multi-lingual character sets unicode-string! u"Hello" & u{Hello} ; ditto as above for uni-code strings typed-series! vector decimal! [1.1 2.2 3.3] ; more efficient tpyed block! storage
>> vector integer! [1 2 3 4]
== #[vector integer! [1 2 3 4]]
>> vector integer! [1 2 3 "hello"]
** script error! Value "hello" of type string! expected type of integer! ** near vector integer! [1 2 3 "hello"] And these are only for starters - a better money! type which supports international currency symbols and formats would be better than the dollar centric nonsense we have just now. Just my thoughts, Mark Dickson