ADBLANCO wrote:Para conversiones de este tipo, Yo prefiero definir esas memvar en un .ch, y despues hacer un #include
Es una solución que no se me había ocurrido... gracias adblanco.
Manuel Valdenebro wrote:triumvirato wrote:
De todas formas, compilando con ambos parámetros sigo con el warning:
C:\PROC_1.PRG(165) Warning W0002 Ambiguous reference, assuming memvar: 'CLI_RAC'
Cuentas al principio, que estás convirtiendo un código-Clipper en FiveWin. Está es mi opinión:
FUNCTION Main()
Local .......
Local ......
Memvar var1, var2, var3, var4 .....
PUBLIC var1, var2, var3, var4 ..... // esto seguramente te falta
- - - - - - - - - - - - - -
Despues, en cada función, solo tienes que declarar las memvar que uses en ESA funcion. Por ejemplo:
FUNCTION CLIENTES()
Local ....
Memvar var2
-------
FUNCTION IMPRIMIR()
local ...
memvar var3, var4
Espero que con esto desaparezcan los "warning".
Gracias Manuel. Efectivamente haciendo así la declaración memvar desaparecen los warning, pero tengo el inconveniente de que son muchísimos. Por eso buscaba una solución (momentánea, hasta avanzar en el desarrollo y encapsular todo un poco más) a través de compilador, ya que en teoría, al compilar con el parámetro /a, debería hacer la declaración automáticamente, como dice la documentación: (extraído de
http://www.ousob.com/ng/harbour/ng69341.php)
The Harbour command line options:
=================================
/a automatic memvar declaration
=================
This causes all variables declared by PARAMETER, PRIVATE or
PUBLIC statements to be automatically declared as MEMVAR
variables.
Pues compilando con /a, los warning siguen apareciendo de esta forma:
C:\Gesco\IMPORT.PRG(3486) Warning W0001 Ambiguous reference: 'RUT_DEF'
Ahora bien, si compilamos con el parámetro /v:
/v variables are assumed M=>
=================
All undeclared or unaliased variables are assumed MEMVAR
variables (private or public variables). If this switch is not
used then the scope of such variables is checked at runtime.
los warning aparecen del modo:
C:\Gesco\IMPORT.PRG(3486) Warning W0002 Ambiguous reference, assuming memvar: 'RUT_DEF'
Se supone que las está asumiendo como memvar.
Creo que tengo bastante cacao-merengao todavía con esto y no soy capaz de darle solución para que asuma las variables public y privita como memvar y no muestre los warning.
Saludos!