| Register | FAQ | Calendar | Search | Today's Posts | Mark Forums Read |
|
#1
| |||
| |||
| Quique, Si lo que pides es lo que me imagino, yo lo hago asi (viva el preprocesador) #Define PARAMETROS_ xPar1, xPar2, xPar3, xPar4, xPar5, xPar6, xPar7, xPar8, xPar9 FUNCTION Fun1(PARAMETROS_) Fun2(PARAMETROS_) RETURN NIL FUNCTION Fun2(PARAMETROS_) RETURN NIL Saludos Quique escribió en mensaje <144cb854-13e3-420b-98c9-1d5a41fe9caf@y38g2000hsy.googlegroups.com>... >In harbour it's possible to use the parameters of this form > >function myFunction( ... ) > myOtherFunction( ... ) >return nil > >or > >function myFunction( param1, param2, ... ) > myOtherFunction( param1, ... ) >return nil > >I know this is possible with hb_aParams() but I think that is but >practical and but elegant |
|
#2
| |||
| |||
| In harbour it's possible to use the parameters of this form function myFunction( ... ) myOtherFunction( ... ) return nil or function myFunction( param1, param2, ... ) myOtherFunction( param1, ... ) return nil I know this is possible with hb_aParams() but I think that is but practical and but elegant |
|
#3
| |||
| |||
| Antonio, si me refiero a eso, lo que sugerí fue poder igualar el código de harbour con el de xharbour, principalmente para poder compilar el código de harbour de forma transparente en xharbour, aunque también como comenté, se me hace mas elegante la manera que maneja harbour, pero bueno, eso es cuestión de gustos. Lo que dices, que es lo mismo que dije yo, si se puede hacer con xharbour, estos serían los 2 ejemplos que puse, pero ahora en xharbour, fijate la difrencia y digamos un poco mas de complejidad, principalmente en el segundo ejemplo function myFunction( ... ) myOtherFunction( hb_aParams() ) return nil y function myFunction( ... ) local aParams := hb_aParams() aDel( aParams, 2, .t. ) execFromArray( @myOtherFunction(), aParams ) return nil |
|
#4
| |||
| |||
| Perdón hace rato tenía prisa y respondí de rápido, ambos ejemplos están mal, aquí está la corrción function myFunction( ... ) hb_execFromArray( @myOtherFunction, hb_aParams() ) return nil y function myFunction( ... ) local aParams := hb_aParams() aDel( aParams, 2, .t. ) hb_execFromArray( @myOtherFunction(), aParams ) return nil |
![]() |
| Thread Tools | |
| Display Modes | |
In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.