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

[REBOL] Re: func args by ladislav

From: rotenca:telvia:it at: 16-Oct-2001 13:01

----- Original Message ----- From: "Ladislav Mecir" <[lmecir--mbox--vol--cz]> To: <[rebol-list--rebol--com]> Sent: Monday, October 15, 2001 10:19 PM Subject: [REBOL] Re: func args by ladislav
> Hi Romano, > > > Hi, Ladislav > > > > I have read your beatiful new article about func args. There is at least > one > > thing with which I do not agree: i think that 'do takes only one argument. > > That cannot explain the difference between: > > args-taken? :- [1 2] ; == 1 > > and > > args-taken? :do reduce [:- 1 2] ; == 3
It is the difference between: do - 1 2 and do :- 1 2 Always only one argument to 'do. Look at:
>> do :-
** Script Error: ?op? expected value1 argument of type: number pair char money date time tuple ** Where: do-boot ** Near: do :- What need an argument? do? No, the function pointed by the op. And here:
>> do -
** Script Error: Operator is missing an argument ** Where: do-boot ** Near: do - It is the operator which need an argument, not 'do. It has been already satisfied by both the espressions.
> head next [1 2] > > , you should write: > > args-taken? :head reduce [next [1 2]]
Now is clear to me how to use the function.
> > To end: > > http://www.sweb.cz/LMecir/contexts.html gives a broken file > > It works OK for me. Does somebody else have the same problem as Romano?
It was an Explorer problem. It continue to read the broken doc from the cache. Problem resolved with Rebol read (better re-read until your server awakes) :-) --- Ciao Romano