Great. But folks pls lets not commit it to Harbour SVN, 
otherwise there will yet another things which will need 
permanent cleanup to keep our codebase coherent.

Brgds,
Viktor


On 2009 Dec 3, at 20:42, Przemysław Czerpak wrote:

> On Thu, 03 Dec 2009, Mindaugas Kavaliauskas wrote:
> 
> Hi,
> 
>> it would be nice to have multiple parameter support for both C and
>> .PRG version of HB_SYMBOL_UNUSED() macro.
> 
> Variadic macros were added as part of C99 standard. Only few C compilers
> like GCC supported variadic macros before C99 specification so we cannot
> use them by default.
> Anyhow if use C compiler with C99 compatible preprocessor then you can try
> to implement it but because C preprocessor is not flexible enough to make
> some more advanced conversions on __VA_ARGS__ then it is necessary to use
> some hacks like stripped by optimizer dummy function, i.e.:
> 
>   extern void _HB_SYMBOL_UNUSED_( int x, ... );
>   #undef HB_SYMBOL_UNUSED
>   #define HB_SYMBOL_UNUSED( ... )   \
>      do { if( 0 ) _HB_SYMBOL_UNUSED_( 0, __VA_ARGS__ ); } while( 0 )
> 
> In .prg code we do not have such problems ;-) so you can simply use:
> 
>   #ytranslate HB_SYMBOL_UNUSED( <v1> , <v2> [, <vN> ] ) => ;
>               HB_SYMBOL_UNUSED( <v1> ) ;
>             ; HB_SYMBOL_UNUSED( <v2> ) ;
>           [ ; HB_SYMBOL_UNUSED( <vN> ) ]
> 
> best regards,
> Przemek
> _______________________________________________
> Harbour mailing list (attachment size limit: 40KB)
> [email protected]
> http://lists.harbour-project.org/mailman/listinfo/harbour

_______________________________________________
Harbour mailing list (attachment size limit: 40KB)
[email protected]
http://lists.harbour-project.org/mailman/listinfo/harbour

Reply via email to