... FUNCTION DemoCalYear()
LOCAL xTab, nCont, oButton[ 12, 31 ], aItem, dDate, nYear := 2025, xDlg
SET WINDOW MAIN OFF
FOR EACH aItem IN oButton
AFill( aItem, .F. )
NEXT
DEFINE WINDOW ( xDlg := Ze_Name( "DLG" ) ) ;
AT 1, 1 ;
WIDTH 800 ;
HEIGHT 600;
TITLE "2025" ;
FONT "Arial" SIZE 18
END ...
Pesquisa resultou em 96 ocorrências: +AFill
Termo pesquisado: +afill
- 07 Jun 2025 10:54
- Fórum: MiniGui
- Tópico: Calendário pra marcar datas
- Respostas: 2
- Exibições: 1050
- 04 Jun 2025 21:24
- Fórum: [x]Harbour
- Tópico: Calendário, marcar dia trabalhado
- Respostas: 35
- Exibições: 16994
Calendário, marcar dia trabalhado
... LOCAL oTab, nCont, oButton[ 12, 31 ], aItem, dDate
hb_Default( @lWithDialog, .T. )
hb_Default( @nYear, 2025 )
FOR EACH aItem IN oButton
AFill( aItem, .F. )
NEXT
IF lWithDialog
INIT DIALOG oDlg ;
TITLE "Test Month" ;
AT 1,1 ;
SIZE 770, 548 ;
STYLE WS_SYSMENU + WS_SIZEBOX + WS ...
hb_Default( @lWithDialog, .T. )
hb_Default( @nYear, 2025 )
FOR EACH aItem IN oButton
AFill( aItem, .F. )
NEXT
IF lWithDialog
INIT DIALOG oDlg ;
TITLE "Test Month" ;
AT 1,1 ;
SIZE 770, 548 ;
STYLE WS_SYSMENU + WS_SIZEBOX + WS ...
- 04 Jun 2025 18:14
- Fórum: [x]Harbour
- Tópico: Calendário, marcar dia trabalhado
- Respostas: 35
- Exibições: 16994
Calendário, marcar dia trabalhado
... FUNCTION OneYear( lWithDialog, oDlg )
LOCAL oTab, nCont, oButton[ 12, 31 ], aItem
hb_Default( @lWithDialog, .T. )
FOR EACH aItem IN oButton
AFill( aItem, .F. )
NEXT
IF lWithDialog
INIT DIALOG oDlg ;
TITLE "Test Month" ;
AT 1,1 ;
SIZE 770, 548 ;
STYLE WS_SYSMENU + WS_SIZEBOX + WS ...
LOCAL oTab, nCont, oButton[ 12, 31 ], aItem
hb_Default( @lWithDialog, .T. )
FOR EACH aItem IN oButton
AFill( aItem, .F. )
NEXT
IF lWithDialog
INIT DIALOG oDlg ;
TITLE "Test Month" ;
AT 1,1 ;
SIZE 770, 548 ;
STYLE WS_SYSMENU + WS_SIZEBOX + WS ...
- 14 Mai 2025 18:17
- Fórum: FiveWin
- Tópico: demoall em fivewin
- Respostas: 0
- Exibições: 1141
demoall em fivewin
... DIALOG oDlg CENTER ;
ON INIT ( Self, ExecuteInit( aInitList ) )
RETURN Nil
STATIC FUNCTION ListOfTabPages()
LOCAL aList := Array(100)
AFill( aList, "" )
RETURN aList
STATIC FUNCTION MenuOption( cCaption, bCodeOrString, bCode )
LOCAL nCont, aLastMenu
aLastMenu := aMenuOptions
FOR ...
ON INIT ( Self, ExecuteInit( aInitList ) )
RETURN Nil
STATIC FUNCTION ListOfTabPages()
LOCAL aList := Array(100)
AFill( aList, "" )
RETURN aList
STATIC FUNCTION MenuOption( cCaption, bCodeOrString, bCode )
LOCAL nCont, aLastMenu
aLastMenu := aMenuOptions
FOR ...
- 25 Mar 2025 15:06
- Fórum: [x]Harbour
- Tópico: PROBLEMAS AO CONVERTER HB_BASE64 UTF8 UTF-8
- Respostas: 14
- Exibições: 3277
PROBLEMAS AO CONVERTER HB_BASE64 UTF8 UTF-8
... localVar!> ) => hb_PIsByRef( @<localVar> )
#xtranslate RAScan( [<x,...>] ) => hb_RAScan( <x> )
#xtranslate ASizeAlloc( <a> [, <n,...>] ) => AFill( <a> )
#xtranslate ALenAlloc( <a> [, <n,...>] ) => Len( <a> )
#xtranslate DateTime( [<x,...>] ) => hb_DateTime( <x> )
#xtranslate Hour( [<x ...
#xtranslate RAScan( [<x,...>] ) => hb_RAScan( <x> )
#xtranslate ASizeAlloc( <a> [, <n,...>] ) => AFill( <a> )
#xtranslate ALenAlloc( <a> [, <n,...>] ) => Len( <a> )
#xtranslate DateTime( [<x,...>] ) => hb_DateTime( <x> )
#xtranslate Hour( [<x ...
- 22 Mai 2024 17:26
- Fórum: Contribuições, Dicas e Tutoriais
- Tópico: DLGAUTO Dialogs automáticas (não geração de fontes)
- Respostas: 156
- Exibições: 133868
Gerador/criação de telas/executor
... é perceber.
LOCAL xDlg, aControl := Array(6), aItem
FOR EACH aItem IN aControl
aItem := EmptyFrmClassItem()
NEXT
Porque FOR/EACH e não Afill() ?
Se usar Afill), todos serão o mesmo array, qualquer mudança em um deles afeta o outro.
É... porque array é por referência.
E o Afill não vai ...
LOCAL xDlg, aControl := Array(6), aItem
FOR EACH aItem IN aControl
aItem := EmptyFrmClassItem()
NEXT
Porque FOR/EACH e não Afill() ?
Se usar Afill), todos serão o mesmo array, qualquer mudança em um deles afeta o outro.
É... porque array é por referência.
E o Afill não vai ...
- 07 Ago 2023 11:11
- Fórum: [x]Harbour
- Tópico: Array - AADD() vai ficando lento.
- Respostas: 26
- Exibições: 2246
Array - AADD() vai ficando lento.
... Harbour pra trabalhar com array,
Não existe esse limite no Harbour, esse limite é do sistema operacional.
Pode usar MeuArray:={1000000}, a função afill() preenche o array... e verifique que é muito rápido.
Lembre-se que está manipulando um arquivo do EXCEL e ele não é rápido e se está aberto mais ...
Não existe esse limite no Harbour, esse limite é do sistema operacional.
Pode usar MeuArray:={1000000}, a função afill() preenche o array... e verifique que é muito rápido.
Lembre-se que está manipulando um arquivo do EXCEL e ele não é rápido e se está aberto mais ...
- 23 Jul 2023 11:43
- Fórum: [x]Harbour
- Tópico: Usar objetos
- Respostas: 25
- Exibições: 3119
Usar objetos
... illustrates how Harbour handles such strings:
#define LEN 10
Procedure Main()
Local i
Local cText := "Hello World!"
Local aList := Array(LEN)
AFill(aList, cText)
For i := 1 To LEN
? i, aList[i], GetPointer(aList[i])
Next
?
// here we will change one string content:
hb_BPoke(@aList[1 ...
#define LEN 10
Procedure Main()
Local i
Local cText := "Hello World!"
Local aList := Array(LEN)
AFill(aList, cText)
For i := 1 To LEN
? i, aList[i], GetPointer(aList[i])
Next
?
// here we will change one string content:
hb_BPoke(@aList[1 ...
- 23 Jul 2023 09:48
- Fórum: [x]Harbour
- Tópico: Usar objetos
- Respostas: 25
- Exibições: 3119
Usar objetos
... seu exemplo mais recente como base, a instrução 'MemoRead( "openoffice41.exe" )' é executada UMA ÚNICA VEZ e o resultado é passado para a função AFILL. Cada elemento da array recebe o mesmo valor, de modo que todos usam o RESULTADO ÚNICO da função MEMOREAD.
Para obter o efeito que você quer ...
Para obter o efeito que você quer ...
- 22 Jul 2023 21:43
- Fórum: [x]Harbour
- Tópico: Usar objetos
- Respostas: 25
- Exibições: 3119
Usar objetos
... no 1 million elements (strings). There is a single one string.
For better understanding TEST1. How many elements has array a?
a := ARRAY(1000000)
AFill(a, {"A"})
? a[1, 1]
? a[2, 1]
a[1, 1] := "B"
? a[1, 1]
? a[2, 1] // Why "second" element is "B" if I changed the "first" element?
For better ...
For better understanding TEST1. How many elements has array a?
a := ARRAY(1000000)
AFill(a, {"A"})
? a[1, 1]
? a[2, 1]
a[1, 1] := "B"
? a[1, 1]
? a[2, 1] // Why "second" element is "B" if I changed the "first" element?
For better ...
- 22 Jul 2023 16:48
- Fórum: [x]Harbour
- Tópico: Usar objetos
- Respostas: 25
- Exibições: 3119
Usar objetos
... tamanho de cada elemento após isso.
20/09/2021 11:50 193.893.864 OpenOffice41.exe
#define THISTEST 0
? Memory(THISTEST)
x := Array(10000000)
AFill( x, MemoRead( "openoffice41.exe" ) )
FOR EACH i IN x
t += Len( i )
NEXT
? Transform( t, "999,999,999,999,999,999" )
? Memory(THISTEST ...
20/09/2021 11:50 193.893.864 OpenOffice41.exe
#define THISTEST 0
? Memory(THISTEST)
x := Array(10000000)
AFill( x, MemoRead( "openoffice41.exe" ) )
FOR EACH i IN x
t += Len( i )
NEXT
? Transform( t, "999,999,999,999,999,999" )
? Memory(THISTEST ...
- 21 Jul 2023 15:40
- Fórum: [x]Harbour
- Tópico: Usar objetos
- Respostas: 25
- Exibições: 3119
Usar objetos
Sei lá.... tanto faz o teste....
x := Array(1000000)
AFill( x, Space(100000000) )
FOR EACH i IN x
t += Len( i )
NEXT
? Transform( t, "999,999,999,999,999" )
hb_MemoWrit( "um.x",x[1] )
1 milhão de elementos de 100MB
100 terabytes, e continua funcionando, e ocupando só 100mb de memória.
Se ...
x := Array(1000000)
AFill( x, Space(100000000) )
FOR EACH i IN x
t += Len( i )
NEXT
? Transform( t, "999,999,999,999,999" )
hb_MemoWrit( "um.x",x[1] )
1 milhão de elementos de 100MB
100 terabytes, e continua funcionando, e ocupando só 100mb de memória.
Se ...
- 20 Jul 2023 17:42
- Fórum: [x]Harbour
- Tópico: Usar objetos
- Respostas: 25
- Exibições: 3119
Usar objetos
Código: Selecionar todos
? Memory(THISTEST)
x := Array(20)
AFill( x, Space(100000000) )
? Memory(THISTEST)
DO WHILE nKey != K_ESC
nKey := Inkey(0)
ENDDO
RETURN
Uso de 2GB de memória e não faz diferença.
- 10 Abr 2023 12:47
- Fórum: [x]Harbour
- Tópico: Tamanho da fonte em MODO CONSOLE
- Respostas: 8
- Exibições: 3560
Tamanho da fonte em MODO CONSOLE
... LOCAL num, I, cCor:=SETCOLOR(), Vetor1[4], Vetor2[4]
IF PCOUNT() == 3
ESPACEJAMENTO := 1
ENDIF
AFILL(Vetor2,"")
FOR i := 1 TO LEN(STRING)
num := SUBSTR(STRING,i,1)
IF NUM == " "
Vetor1[1] := " "
Vetor1[2] := " "
Vetor1[3] := " "
Vetor1[4 ...
IF PCOUNT() == 3
ESPACEJAMENTO := 1
ENDIF
AFILL(Vetor2,"")
FOR i := 1 TO LEN(STRING)
num := SUBSTR(STRING,i,1)
IF NUM == " "
Vetor1[1] := " "
Vetor1[2] := " "
Vetor1[3] := " "
Vetor1[4 ...
- 22 Fev 2023 14:44
- Fórum: [x]Harbour
- Tópico: CriptogMem
- Respostas: 39
- Exibições: 2544
CriptogMem
... FUNCTION MAIN
set exact on
clear screen
readkill(.T.)
getlist:= {}
set exclusive off
public dado
kmold:= .T.
private mcab[4], dado[50]
afill(dado, Replicate("%%*%*$^*&^", 7) + "%%*%")
mcab[1]:= "MEMPRE"
mcab[2]:= "CODEMP"
mcab[3]:= "MERASO"
mcab[4]:= "MECGCE"
arqi := "SPAG0.MEM ...
set exact on
clear screen
readkill(.T.)
getlist:= {}
set exclusive off
public dado
kmold:= .T.
private mcab[4], dado[50]
afill(dado, Replicate("%%*%*$^*&^", 7) + "%%*%")
mcab[1]:= "MEMPRE"
mcab[2]:= "CODEMP"
mcab[3]:= "MERASO"
mcab[4]:= "MECGCE"
arqi := "SPAG0.MEM ...