Hello Przemek

Przemyslaw Czerpak-2 wrote:
> 
>> To me current large DO CASE statement seems equivalent to
>> this single function call:
>> ::pPtr := hb_ExecFromArray( @qt_*(), hb_AParam() )
>> It will pass through the number of parameters received.
> 
> Both method are two complicated. ... can be used as argument in Harbour
> in function parameters, array elements and in array indexes so the above
> code can be reduced two:
> 
>    METHOD New( ... ) CLASS QBrush
>       ::pPtr := Qt_QBrush( ... )
>       RETURN Self
> 
> No need for CASE ... / SWITCH statements or intermediate calls with
> hb_ExecFromArray().
> Please make some test. It's very powerful mechanism, i.e. instead of
>    aP := hb_aPrama()
> you can use:
>    aP := { ... }
> Plase also note that you can use ... more then once and ,mix with other
> arguments, f.e.:
> 
>    FUNC F1( V1, V2, ... )
>    F( { V1, V2 }, "P1", ..., "->", { ..., ..., {...} }, ... )
> 

Wow, I did not know this syantax has such capability.
I will test it today and will change the code.

Regards
Pritpal Bedi


-- 
View this message in context: 
http://www.nabble.com/SF.net-SVN%3A-harbour-project%3A-11654--trunk-harbour-tp24368969p24373918.html
Sent from the Harbour - Dev mailing list archive at Nabble.com.

_______________________________________________
Harbour mailing list
[email protected]
http://lists.harbour-project.org/mailman/listinfo/harbour

Reply via email to