It's possible to equal this with harbour

This is a discussion on It's possible to equal this with harbour within the xharbour forums in Programming Languages category; 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 ...

Go Back   Application Development Forum > Programming Languages > xharbour

Object Mix

Register FAQ Calendar Search Today's Posts Mark Forums Read
  #1  
Old 08-06-2008, 06:06 PM
Antonio Martinez
Guest
 
Default Re: It's possible to equal this with harbour

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



Reply With Quote
  #2  
Old 08-06-2008, 06:51 PM
Quique
Guest
 
Default It's possible to equal this with harbour

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
Reply With Quote
  #3  
Old 08-07-2008, 12:31 PM
Quique
Guest
 
Default Re: It's possible to equal this with harbour

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
Reply With Quote
  #4  
Old 08-07-2008, 02:49 PM
Quique
Guest
 
Default Re: It's possible to equal this with harbour

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
Reply With Quote
Reply


Thread Tools
Display Modes


All times are GMT -5. The time now is 07:54 AM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
vB Ad Management by =RedTyger=

In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.