Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

It's possible to equal this with harbour

17 views
Skip to first unread message

Quique

unread,
Aug 6, 2008, 6:51:03 PM8/6/08
to
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

Antonio Martinez

unread,
Aug 6, 2008, 6:06:50 PM8/6/08
to
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...@y38g2000hsy.googlegroups.com>...

Quique

unread,
Aug 7, 2008, 12:31:29 PM8/7/08
to
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

Quique

unread,
Aug 7, 2008, 2:49:44 PM8/7/08
to
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

0 new messages