- user@pc-positivo:/media/user/SAMSUNG/Livro$ hbmk2 -hbexe -ldflag=-no-pie menu.prg
Harbour 3.2.0dev (r1610041322)
Copyright (c) 1999-2016, http://harbour-project.org/
Compiling 'menu.prg'...
Compiling 'inicio.prg'...
Cannot open INSIG.prg, assumed external
Compiling 'menu1.prg'...
Compiling 'menu2.prg'...
Compiling 'menu3.prg'...
Compiling 'menuproc.prg'...
Compiling 'menu11.prg'...
Compiling 'menu12.prg'...
Compiling 'menu13.prg'...
Compiling 'menu14.prg'...
Compiling 'menu15x.prg'...
Compiling 'menu2p.prg'...
Compiling 'menu23.prg'...
Compiling 'menu24.prg'...
Compiling 'inicio3.prg'...
Compiling 'menu31.prg'...
Compiling 'menu32.prg'...
Compiling 'menu33.prg'...
Compiling 'menu34.prg'...
Compiling 'menu35.prg'...
Compiling 'menu36.prg'...
Compiling 'menu1s.prg'...
Compiling 'menu3s.prg'...
Compiling 'menu351.prg'...
menu351.prg(28) Error E0030 Syntax error "syntax error at 'QTPEDIDA'"
menu351.prg(45) Error E0030 Syntax error "syntax error at 'NORDCOMP'"
Compiling 'menu352.prg'...
Compiling 'menu353.prg'...
Compiling 'menu354.prg'...
Compiling 'menu361.prg'...
Compiling 'menu362.prg'...
Compiling 'menu35p.prg'...
Compiling 'menu361a.prg'...
Compiling 'menu361b.prg'...
Compiling 'menu361c.prg'...
2 errors
No code generated.
hbmk2: Erro: Executando o compilador Harbour (interno): 1
(/usr/bin/harbour) -n2 menu.prg -o/tmp/hbmk_tfwdqr.dir/ -i/usr/include/harbour
user@pc-positivo:/media/user/SAMSUNG/Livro$
Estudando velho DBase ... e aplicando ao Harbour ...
Moderador: Moderadores
-
arcanjoebc
- Usuário Nível 2

- Mensagens: 63
- Registrado em: 23 Dez 2015 23:58
- Localização: Tramandaí/RS
Estudando velho DBase ... e aplicando ao Harbour ...
Depois de muito tempo, resolvi voltar a programar como nos tempos do MS-DOS. Adquiri um livro no site do EstanteVirtual e estou construindo um pequeno sistema comercial "às antigas" ... porém o conhecimento que tenho é apenas de DBase e, muita coisa eu já nem lembrava mais. Agora, me deparei com um erro na compilação do mesmo, aparecendo a seguinte mensagem:
- Itamar M. Lins Jr.
- Administrador

- Mensagens: 7928
- Registrado em: 30 Mai 2007 11:31
- Localização: Ilheus Bahia
- Curtiu: 1 vez
Estudando velho DBase ... e aplicando ao Harbour ...
Olá!
Bem vindo.
Mostre as linhas dos dois erros. Pelo menos 3 linhas de cada.
menu351.prg(28) Error E0030 Syntax error "syntax error at 'QTPEDIDA'" 27,28,29
menu351.prg(45) Error E0030 Syntax error "syntax error at 'NORDCOMP'" 44,45,46
Saudações,
Itamar M. Lins Jr.
Bem vindo.
Mostre as linhas dos dois erros. Pelo menos 3 linhas de cada.
menu351.prg(28) Error E0030 Syntax error "syntax error at 'QTPEDIDA'" 27,28,29
menu351.prg(45) Error E0030 Syntax error "syntax error at 'NORDCOMP'" 44,45,46
Saudações,
Itamar M. Lins Jr.
Saudações,
Itamar M. Lins Jr.
Itamar M. Lins Jr.
-
alxsts
- Colaborador

- Mensagens: 3092
- Registrado em: 12 Ago 2008 15:50
- Localização: São Paulo-SP-Brasil
Estudando velho DBase ... e aplicando ao Harbour ...
Olá!
Um dos colegas aqui do fórum, Vlademiro Landim Jr, publicou um livro que, creio eu, pode te ajudar: INTRODUÇÃO A PROGRAMAÇÃO USANDO A LINGUAGEM HARBOUR
Um dos colegas aqui do fórum, Vlademiro Landim Jr, publicou um livro que, creio eu, pode te ajudar: INTRODUÇÃO A PROGRAMAÇÃO USANDO A LINGUAGEM HARBOUR
[]´s
Alexandre Santos (AlxSts)
Alexandre Santos (AlxSts)
-
arcanjoebc
- Usuário Nível 2

- Mensagens: 63
- Registrado em: 23 Dez 2015 23:58
- Localização: Tramandaí/RS
Estudando velho DBase ... e aplicando ao Harbour ...
%Eu li esse e-book, mas precisava de algo mais específico, que falasse de Sistemas Comerciais para PC, então comprei um livro bem baratinho, no EstanteVirtual, chamado, "dbase III Plus, Aplicões Comerciais", de autoria de Robert A. Byers. Muita coisa nele é similar ao que aprendi nos 1900 e antigamente, o que ajuda a recapitular ... pretendia fazer os exemplos e, depois, compilar no Harbour. Até agora estava dando certo, 98% de compatibilidade e com pequenas modificações. Mas neste caso não tem sentido ... Abre o DBF, o campo existe e o compilador diz que dois campos estão com erro de sintaxe ... eu não me lebro muito do comando SUM ... TO ..., por isso resolvi perguntar. Vou colocar o código abaixo para que vejam:
Aguardo alguma instruçãoi futura, tudo de bom a todos!
Código: Selecionar todos
*-----------------------------------------------------------*
* PROGRAMA : menu351.prg *
* DATA : 16/08/2021 *
* FINALIDADE : PROCURAR NO INVENTARIO *
*-----------------------------------------------------------------*
PROCEDURE menu351
clear
? "Procurando no Inventario quais livros precisam ser comprados"
select LIVROPED
set relation to
select INVENTAR
set relation to ISBN into LIVROPED
set filter to QTESTQ + LIVROPED->QTPEDIDA < ESTQMIN
go top
if eof()
? "Nao ha livros para comprar"
wait
else
? "Processando Ordens de Compra"
endif
MNORDCMP = CONTROLE->NORDCOMP
do while .not. eof()
MCODFORN = CODFORN
do while INVENTAR->CODFORN = MCODFORN .and. .not. eof()
select LIVROPED
sum QTPEDIDA while INVENTAR->ISBN = ISBN to QTLVRPED
if QTLVRPED + INVENTAR->QTESTQ < INVENTAR->ESTQMIN
append blank
replace ISBN with INVENTAR->ISBN,;
DATPEDIDO with date(),;
QTPEDIDA with INVENTAR->QTPEDIDA
replace CUSTO with INVENTAR->CUSTO,;
NORDCOMP with CONTROLE->NORDCOMP,;
CODFORN with INVENTAR->CODFORN
do while QTLVRPED + QTPEDIDA < INVENTAR->ESTQMIN
replace QTPEDIDA with QTPEDIDA+INVENTAR->QTPEDIDA
enddo
endif
select INVENTAR
skip
enddo
select CONTROLE
replace NORDCOMP with NORDCOMP + 1 with date()
select INVENTAR
enddo
set filter to
set relation to CODFORN into FORNECED
select LIVROPED
set relation to ISBN into INVENTAR
if MNORDCMP # CONTROLE->NORDCOMP
do menu352 with 1, CDATA,BAR
endif
RETURN
Editado pela última vez por Itamar M. Lins Jr. em 26 Ago 2021 21:14, em um total de 2 vezes.
Razão: Editei pq, só faltou fechar o colchete no inicio.
Razão: Editei pq, só faltou fechar o colchete no inicio.
-
alxsts
- Colaborador

- Mensagens: 3092
- Registrado em: 12 Ago 2008 15:50
- Localização: São Paulo-SP-Brasil
Estudando velho DBase ... e aplicando ao Harbour ...
Olá!
Por
Esta linha (44) também está com erro (tem 2 WITH):
Para referências sobre comandos e funções, acesse este link que contém o CA-Clipper 5.3 - Guide To CA-Clipper
Veja:arcanjoebc escreveu:eu não me lebro muito do comando SUM ... TO ..., por isso resolvi perguntar
TroqueSUM
Sum numeric expressions and assign results to variables
------------------------------------------------------------------------------
Syntax
SUM <nExp list> TO <idVar list>
[<scope>] [WHILE <lCondition>] [FOR <lCondition>]
Arguments
<nExp list> is the list of numeric values to sum for each record
processed.
TO <idVar list> identifies the receiving variables to be assigned
assign the results of the sum. Variables that either do not exist or
are not visible are created as private variables. <idVar list> must
contain the same number of elements as <nExp list>.
<scope> is the portion of the current database file to SUM. The
default scope is ALL records.
WHILE <lCondition> specifies the set of records meeting the
condition from the current record until the condition fails.
FOR <lCondition> specifies the conditional set of records to SUM
within the given scope.
Description
SUM is a database command that totals a series of numeric expressions
for a range of records in the current work area and assigns the results
to a series of variables. The variables specified in <idVar list> can
be field, local, private, public, or static.
Note that the <nExp list> is required and not optional as it is in other
dialects.
Examples
. This example illustrates the use of SUM:
LOCAL nTotalPrice, nTotalAmount
USE Sales NEW
SUM Price * .10, Amount TO nTotalPrice, nTotalAmount
//
? nTotalPrice // Result: 151515.00
? nTotalAmount // Result: 150675.00
Código: Selecionar todos
sum QTPEDIDA while INVENTAR->ISBN = ISBN to QTLVRPEDCódigo: Selecionar todos
SUM QTPEDIDA TO QTLVRPED WHILE INVENTAR->ISBN = ISBNCódigo: Selecionar todos
replace NORDCOMP with NORDCOMP + 1 with date()[]´s
Alexandre Santos (AlxSts)
Alexandre Santos (AlxSts)
- JoséQuintas
- Administrador

- Mensagens: 20267
- Registrado em: 26 Fev 2007 11:59
- Localização: São Paulo-SP
Estudando velho DBase ... e aplicando ao Harbour ...
E esta parte que não acusou erro... tá esquisita
Código: Selecionar todos
do while QTLVRPED + QTPEDIDA < INVENTAR->ESTQMIN
replace QTPEDIDA with QTPEDIDA+INVENTAR->QTPEDIDA
enddo
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
Estudando velho DBase ... e aplicando ao Harbour ...
Olá!
Apenas atualizando o link para download do livro, pois aquele postado acima está quebrado:
Download: INTRODUÇÃO A PROGRAMAÇÃO USANDO A LINGUAGEM HARBOUR
Apenas atualizando o link para download do livro, pois aquele postado acima está quebrado:
Download: INTRODUÇÃO A PROGRAMAÇÃO USANDO A LINGUAGEM HARBOUR
[]´s
Alexandre Santos (AlxSts)
Alexandre Santos (AlxSts)