why 2 error?
[1/7] from: pat665:ifrance at: 22-Nov-2001 22:30
Hi,
Reading Ladislav "Words, Aliases, Contexts, Visualizations, Bindings and
Scope in Rebol.html" I found the following function.
undefined?: func [
{determines, if a word is undefined}
word [any-word!]
] [
error? try [error? get/any :word]
]
I can't figure out why there is two error? in the last line.
It seems to me (and I have experimented on the console) that >> error? try
[get/any :word] << will do the job as well. I'm afraid I am missing
something because I have seen in many rebol-list posts that Ladislav is
dedicated to produce clean and concise code.
So what's wrong with my shorter (and presumptuous) version ?
Mais c'est en forgeant, qu'on devient forgeron, comme on dit chez nous.
Patrick
[2/7] from: lmecir:mbox:vol:cz at: 23-Nov-2001 10:04
The difference is as follows:
disarm err: make error! {an error}
undefined? 'err ; == false
word: 'err
error? try [get/any :word] ; == true
Personne savant n'est tombe de ciel, comme on dit chez nous. (could you
correct my translation?)
Cheers
Ladislav
----- Original Message -----
From: "Patrick Philipot" <[pat665--ifrance--com]>
To: <[rebol-list--rebol--com]>
Sent: Thursday, November 22, 2001 10:30 PM
Subject: [REBOL] why 2 error?
Hi,
Reading Ladislav "Words, Aliases, Contexts, Visualizations, Bindings and
Scope in Rebol.html" I found the following function.
undefined?: func [
{determines, if a word is undefined}
word [any-word!]
] [
error? try [error? get/any :word]
]
I can't figure out why there is two error? in the last line.
It seems to me (and I have experimented on the console) that >> error? try
[get/any :word] << will do the job as well. I'm afraid I am missing
something because I have seen in many rebol-list posts that Ladislav is
dedicated to produce clean and concise code.
So what's wrong with my shorter (and presumptuous) version ?
Mais c'est en forgeant, qu'on devient forgeron, comme on dit chez nous.
Patrick
[3/7] from: rebol665:ifrance at: 23-Nov-2001 12:26
Hi Ladislav
Your are right as I expected.
error? try [get/any :word] :== true
error? try [error? get/any :word];== false
Facts are facts ! I'll have to spend some time to digest this.
Lentement mais surement
. BTW your french is pretty good. With minor
correction it goes like this "Personne n'est tombé du ciel savant." (where
savant
qualifies "personne" not "ciel").
I think the same idea is expressed by "Personne ne sort savant du ventre de
sa mère."
Encore merci pour cette lumineuse réponse.
Patrick
[4/7] from: lmecir:mbox:vol:cz at: 23-Nov-2001 14:17
Hi Patrick,
there seems to be an analogy between the Rebol code below and the difference
between french:
Je regrette rien.
and "Je ne regrette rien." ;-)
<<Patrick>>
error? try [get/any :word] :== true
error? try [error? get/any :word];== false
<</Patrick>>
[5/7] from: max:quazart at: 23-Nov-2001 9:09
Ladislav,
you never cease to amaze me...
How did your twisted mind come up with this very appropriate analogy?
Actually ... don't bother answering... I don't want to look dumb, not
understanding the answer ;-)
a la prochaine!
-Maxim
[6/7] from: rebol665::ifrance::com at: 23-Nov-2001 16:32
Hi Ladislav,
Good point. Indeed people should say "je ne regrette rien", but actually
they often say "je regrette rien". However the meaning is the same and it is
obviously NOT the same with this two Rebol code.
And BTW, "Je ne regrette rien" is a great song by Edith Piaf.
Patrick
ps : "je ne regrette rien" means "I regret nothing" or "I have no remorse"
[7/7] from: doncox:enterprise at: 23-Nov-2001 22:52
On 23-Nov-01, pat665, french new rebolist wrote:
> And BTW, "Je ne regrette rien" is a great song by Edith Piaf.
>
> Patrick
>
> ps : "je ne regrette rien" means "I regret nothing" or "I have no
> remorse"
http://www.proper-records.co.uk/boxsets/pbox35.htm
(getting a bit off topic) ;-)
Regards
--
Don Cox
[doncox--enterprise--net]