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

[REBOL] Re: Is a "series" aka an "array"

From: tim-johnsons:web at: 4-Nov-2010 11:54

* Duke Normandin <dukeofperl-ml1.net> [101103 15:10]:
> Hey list... > > I'm re-visiting REBOL, and I must say that I'm appreciating it a whole > lot more this 2nd time around. > > Just to be clear - is a REBOL series exactly the same thing as an > array in other languages?
Hi Duke I'm going to take a little different track on your question: First of all, datatypes in rebol are layed out in a hierarchy. This differs from any other programming language that I have worked with. So .... a block is a series, but a series is not necessarily a block because the block! datatype is subordinate to the series datatype as is string!, issue! and others: From the console
>> type? #000000
== issue!
>> series? #000000
== true
>> b: [my name is Duke]
== [my name is Duke]
>> type? b
== block!
>> series? b
== true
>> s: "my name is duke"
== "my name is duke"
>> type? s
== string!
>> series? s
== true ;; end of code I hope you don't find this too confusing, but this knowledge may prove helpful, for instance in setting up the interface for a function. -- Tim tim at johnsons-web.com or akwebsoft.com http://www.akwebsoft.com