Só agora descobri como inicializar valores na classe sem precisar criar o método new.
Só esbarrei em array previamente preenchida.
Harbour tem algo pronto pra isso?
Por enquanto pensei nesta solução, pra array unidimensional:
Create Class Teste
cVarChar INIT ""
nVarNum INIT 0
aVarArray INIT ArrayOf("",100)
EndClass
Function ArrayOf(xConteudo,nQuantidade)
Local aArray
aArray := Array(nQuantidade)
aFill aArray(xConteudo)
Return aArray
Criar array preenchido - Harbour tem algo pra isso?
Moderador: Moderadores
- JoséQuintas
- Administrador

- Mensagens: 20267
- Registrado em: 26 Fev 2007 11:59
- Localização: São Paulo-SP
Criar array preenchido - Harbour tem algo pra isso?
José M. C. Quintas
Harbour 3.2, mingw, gtwvg mt, fivewin 25.04, multithread, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui mt), (hmg3), (hmg extended), (oohg), PNotepad, ASP, stored procedure, stored function, Linux (Flagship/harbour 3.2)
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"
https://github.com/JoseQuintas/
Harbour 3.2, mingw, gtwvg mt, fivewin 25.04, multithread, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui mt), (hmg3), (hmg extended), (oohg), PNotepad, ASP, stored procedure, stored function, Linux (Flagship/harbour 3.2)
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"
https://github.com/JoseQuintas/
-
alxsts
- Colaborador

- Mensagens: 3092
- Registrado em: 12 Ago 2008 15:50
- Localização: São Paulo-SP-Brasil