[Prev][Next][Index][Thread]
Re: Q: Symbol optional in keyword parameter definition?
On Monday, June 25, 2001, at 03:00 pm, Roland Paterson-Jones wrote:
> What does it mean when you define a method such as:
>
> define method m( req1, req2, req3, #key key1 ) ...
>
> where key1 is a keyword parameter with no associated keyword symbol?
> How can
> key1 be bound and used?
key1 does double duty as the keyword and the binding name in the
function.
So:
m( 1, 2, 3, key: 1 );
You can give the keyword and the binding different names if you like:
define method m( req1, req2, req3, #key key1: key1-var )
- Rob.
References: