Page 1 of 1

Harbour y variables statics

PostPosted: Wed Jul 17, 2019 5:15 pm
by Compuin
Hola,

Ya es posible en harbour utilizar variables estaticas en un programa HRB ???

Re: Harbour y variables statics

PostPosted: Wed Jul 17, 2019 5:21 pm
by hmpaquito
Una pregunta ¿ Cuando no fue posible usar variables estaticas en un modulo HRB ?

Re: Harbour y variables statics

PostPosted: Wed Jul 17, 2019 5:24 pm
by Compuin
hmpaquito wrote:Una pregunta ¿ Cuando no fue posible usar variables estaticas en un modulo HRB ?


Hmpaquito, si lo estoy preguntando es por que realmente no lo se.

No deberias ser sarcastico al responder una duda de un miembro de este foro.

Re: Harbour y variables statics

PostPosted: Wed Jul 17, 2019 10:32 pm
by armando.lagunas
Define las variables estaticas al principio de cada PRG

Code: Select all  Expand view

#include "FiveWin.ch"
#include "xBrowse.ch"
#include "Viking_Master.ch"
#include "TSButton.ch"
#include "noway.ch"
#include "DTPicker.ch"
#include "Image.ch"
 
MEMVAR oApp
STATIC cOrden  , aLinea , cLinea, cCargo   , cPallInc  , cPallet    , dFecInt    , nCaja  , nKiloReb, nMerKil, nKilFal , nKilPro, nMerma
STATIC aFruta  , aEnva  , aPesos, aReceta  , cReceta   , aBasePallet, cBasePallet, cFruta , aFactor , aBolsas, aCalibre, aFoto  , nFactor
STATIC cCalibre, nUnidad, nPesos, lVerDatos, cTipoFruta, cEnva      , cObser     , aMotivo, aRestr  , cMotivo, lCargo  , cFechaE, cControl

#define MAINPRO    "PRetail"
#define VERSIONPRO "0.85."+oApp:cVersion

//-----------------
FUNCTION ProcesosRetails( xBtn )
LOCAL xDlg, oBar, oB, xFont, oIco, oPag[2], oGet[25], oBrw[3], oBus[2], lError
...
...
...
 

Re: Harbour y variables statics

PostPosted: Wed Jul 17, 2019 10:55 pm
by Compuin
armando.lagunas wrote:Define las variables estaticas al principio de cada PRG

Code: Select all  Expand view

#include "FiveWin.ch"
#include "xBrowse.ch"
#include "Viking_Master.ch"
#include "TSButton.ch"
#include "noway.ch"
#include "DTPicker.ch"
#include "Image.ch"
 
MEMVAR oApp
STATIC cOrden  , aLinea , cLinea, cCargo   , cPallInc  , cPallet    , dFecInt    , nCaja  , nKiloReb, nMerKil, nKilFal , nKilPro, nMerma
STATIC aFruta  , aEnva  , aPesos, aReceta  , cReceta   , aBasePallet, cBasePallet, cFruta , aFactor , aBolsas, aCalibre, aFoto  , nFactor
STATIC cCalibre, nUnidad, nPesos, lVerDatos, cTipoFruta, cEnva      , cObser     , aMotivo, aRestr  , cMotivo, lCargo  , cFechaE, cControl

#define MAINPRO    "PRetail"
#define VERSIONPRO "0.85."+oApp:cVersion

//-----------------
FUNCTION ProcesosRetails( xBtn )
LOCAL xDlg, oBar, oB, xFont, oIco, oPag[2], oGet[25], oBrw[3], oBus[2], lError
...
...
...
 


Muchas gracias Armando

Re: Harbour y variables statics

PostPosted: Thu Jul 18, 2019 7:32 am
by jvtecheto
armando.lagunas wrote:Define las variables estaticas al principio de cada PRG

Code: Select all  Expand view

#include "FiveWin.ch"
#include "xBrowse.ch"
#include "Viking_Master.ch"
#include "TSButton.ch"
#include "noway.ch"
#include "DTPicker.ch"
#include "Image.ch"
 
MEMVAR oApp
STATIC cOrden  , aLinea , cLinea, cCargo   , cPallInc  , cPallet    , dFecInt    , nCaja  , nKiloReb, nMerKil, nKilFal , nKilPro, nMerma
STATIC aFruta  , aEnva  , aPesos, aReceta  , cReceta   , aBasePallet, cBasePallet, cFruta , aFactor , aBolsas, aCalibre, aFoto  , nFactor
STATIC cCalibre, nUnidad, nPesos, lVerDatos, cTipoFruta, cEnva      , cObser     , aMotivo, aRestr  , cMotivo, lCargo  , cFechaE, cControl

#define MAINPRO    "PRetail"
#define VERSIONPRO "0.85."+oApp:cVersion

//-----------------
FUNCTION ProcesosRetails( xBtn )
LOCAL xDlg, oBar, oB, xFont, oIco, oPag[2], oGet[25], oBrw[3], oBus[2], lError
...
...
...
 


Fuera del ambito de la pregunta, tengo esta curiosidad porque veo que lo haceis muchos usuarios que sabeis bastante.

¿Porque incluis siempre #include "xBrowse.ch", si
#include "fivewin.ch" ya incluye el xBrowse.

Se consigue algun tipo de funcionalidad extra.?

Gracias.

Jose

Re: Harbour y variables statics

PostPosted: Thu Jul 18, 2019 1:16 pm
by armando.lagunas
Hola Jose:

mi versión de fivewin es antigua y siempre trato de ayudar a toda la gente que no tiene la oportunidad de actualizarse con frecuencia, en la cual me incluyo.

Saludos