[REBOL] Re: Obtaining a word's value
From: ryanc:iesco-dms at: 5-Jul-2001 13:32
Here is a few more... depending on the rules, this could be an
infinite process...
>> first do/next [a]
== "This seems to work."
>> if true [a]
== "This seems to work."
>> either a [a] [a]
== "This seems to work."
>> loop 1 [a]
== "This seems to work."
>> forever [break/return a] ; works with all loops
== "This seems to work."
>> for b 1 1 1 [a]
== "This seems to work."
>> first repend [] a
== "This seems to work."
>> probe a
This seems to work.
== "This seems to work."
>> f: function[][][a] f ; func, does, and has
== "This seems to work."
>> system/words/a
== "This seems to work."
>> p: to-path [a] p
== "This seems to work."
>> try [a]
== "This seems to work."
>> throw-on-error [a]
== "This seems to work."
>> switch/default none [][a]
== "This seems to work."
>> rejoin [a]
== "This seems to work."
>> maximum a a
== "This seems to work."
>> minimum a a
== "This seems to work."
>> copy a
== "This seems to work."
>> ?? a
a: "This seems to work."
== "This seems to work."
>> catch [a]
== "This seems to work."
>>
Joel Neely wrote:
> Hi, all,
>
> As a break in the discussion of whether to include our thumbs when
> we count on our fingers... ;-) let me pose the following question:
>
> Given a word A which currently "has" an associated value,
> how many distinct means does REBOL offer by which can we
> retrieve that value?
>
> A starter list of answers for the simple case
>
> >> a: "this is a test" ;== "this is a test"
>
> would include
>
> >> a ;== "this is a test"
> >> :a ;== "this is a test"
> >> do [a] ;== "this is a test"
> >> do "a" ;== "this is a test"
> >> first reduce [a] ;== "this is a test"
> >> get 'a ;== "this is a test"
> >> get/any 'a ;== "this is a test"
> >> get first [a] ;== "this is a test"
> >> get to-word "a" ;== "this is a test"
> >> (a) ;== "this is a test"
> >> any [a] ;== "this is a test"
>
> By "distinct means" I hope to exclude variations on any theme that
> really don't add new/distinct capabilities. For example, since
>
> do [a]
>
> is on the list above, is there any point in adding
>
> do [do [do [a]]]
>
> and, since
>
> any [a]
>
> is already listed, can we pass over trivial variations such as
>
> any [false a]
> any [none false a]
>
> or are there actual differences (beyond increased run-time) for
> some possible values of A ?
>
> -jn-
>
> ___________________________________________________________________
> "The purpose of computing is insight, not numbers!" - R. W. Hamming
>
> joel'dot'neely'at'fedex'dot'com
> --
> To unsubscribe from this list, please send an email to
> [rebol-request--rebol--com] with "unsubscribe" in the
> subject, without the quotes.
--
Ryan Cole
Programmer Analyst
www.iesco-dms.com
707-468-5400