Can ByRef parameter be default nil ?

Ruslan Zasukhin sunshine at public.kherson.ua
Sat Jun 12 19:41:57 CDT 2004


On 6/12/04 7:36 PM, "Charles Yeomans" <yeomans at desuetude.com> wrote:

>>>> Does this work in REALbasic ?
>>>> 
>>>> "foo(inValue as Variant, outCount byref as Integer = nil )"  ?
>>> 
>>> No, that will not work. A ByRef parameter is always bound to a
>>> specific
>>> variable; you cannot pass in Nil instead.
>> 
>> Ok, thank you Mars.
>> 
>> You think it is not possible allow ByRef parameter to be nil (in
>> future)?
>> 
>> 
>> Compare RB SDK to Macromedia SDK.
>> 
>>     in Director I can easy have function with 4 params
>>     and specify that it can have from 2 to 4 params.
>> 
>>     we have in XDK way to check
>> 
>>         param count
>>         param_exists( 3 )
>> 
>> The same works in pugins for PHP, webSisphon, ...
>> 
>> I think this is more powerful way that we have now in REALbasic SDK.
>> Agree?
>> 
> 
> I think that you should not return values in parameters in Rb.

Hi Charles,

1) above point about param_exists() is important not always for
    task "return in param".

2) then why exists ByRef ?
    I see only its usage for return of value from function.

3) we really need this Charles in this function for Valentina 2.0

     ValueExists( inValue as Variant,
                  outCount byref as Integer,
                  inSelection as VSet = nill ) as boolean

Return already taken -- boolean,
But this function may return also additional info.

And we must not make another function, Charles,
Because it make hard search in the index or even in scan of table's column.

-- 
Best regards,
Ruslan Zasukhin      [ I feel the need...the need for speed ]
-------------------------------------------------------------
e-mail: ruslan at paradigmasoft.com
web: http://www.paradigmasoft.com

To subscribe to the Valentina mail list go to:
http://lists.macserve.net/mailman/listinfo/valentina
-------------------------------------------------------------



More information about the Valentina-beta mailing list