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

[REBOL] Antwort: Re: "AT" usage, strange..

From: sharriff:aina:med-iq at: 6-Nov-2000 8:26

Thanks Andrew! seems that I´m still not awake yet :-) what time is it at the moment in New Zealand Andrew? just curious... Sharriff Aina med.iq information & quality in healthcare AG "Andrew Martin" An: <[rebol-list--rebol--com]> <[Al--Bri--xtra]. Kopie: co.nz> Thema: [REBOL] Re: "AT" usage, strange.. Gesendet von: rebol-bounce@ rebol.com 06.11.00 21:23 Bitte antworten an rebol-list Sharriff asked:
> Could someone explain why this happens? (see below) > > >> test: [one: "value1" two: "value2" three: "value3" ] > == [one: "value1" two: "value2" three: "value3"] > >> length? test > == 6 > >> print at test 3 > value2 value3 > > according to the REBOL dictionary: > > " > Provides a simple way to index into a series. AT returns the series at
the
> new index point. Note that the operation is relative to the current > position within the series. " > why are the words in the block not retured also? they are also elements
of the block "test" and therefore also indexed?
>> test: [one: "value1" two: "value2" three: "value3" ]
== [one: "value1" two: "value2" three: "value3"]
>> length? test
== 6
>> at test 3
== [two: "value2" three: "value3"]
>> reduce at test 3
== ["value2" "value3"]
>> print [two: "value2" three: "value3"]
value2 value3
>> two
== "value2"
>> three
== "value3" Check out page 83 of the Core manual, about 'print using 'reduce as part of it's operation. I hope that helps! Andrew Martin ICQ: 26227169 http://members.nbci.com/AndrewMartin/