Syntax error

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

Post Reply
cocoking
Posts: 46
Joined: Tue Jun 15, 2010 1:15 pm
Location: Malabang, Lanao del Sur

Syntax error

Post by cocoking »

Hello...

I'm getting syntax errors on my modal window and grid definitions:

deductio.prg(57) Error E0030 Syntax error "syntax error at 'WINDOW'"
deductio.prg(65) Error E0030 Syntax error "syntax error at '@'"

on these codes:

Code: Select all

declare window MainForm

dbselectarea("PERSONEL")
dbgotop()

aHeaders := {"Emp No.", "Employee Name", "Company"}
aWidths  := {80, 203, 100}	

DEFINE WINDOW wiDeduct ;
	AT 10, 10 ;
	WIDTH 650 ;
	HEIGHT 600 ;
	TITLE "Deductions" ;
	MODAL                              <---- line 57

	@ 10, 10 GRID grDeduct ;
		width    510 ;
		height   510 ;
		headers  aHeaders ;
		widths   aWidths ;
		rowsource "PERSONEL" ;
		columnfields {"empnum", "empname", "company"}   <---- line 65	
		
END WINDOW

CENTER WINDOW wiDeduct
ACTIVATE WINDOW wiDeduct
Please find time to analyze and help me.
TYVM.
User avatar
esgici
Posts: 4543
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Contact:

Re: Syntax error

Post by esgici »

Hello cocoking

Did you include

Code: Select all

#include "hmg.ch" 
at beginning of every .prg file ?

Your problem may be came by this point.

Regards

--

Esgici
Viva INTERNATIONAL HMG :D
cocoking
Posts: 46
Joined: Tue Jun 15, 2010 1:15 pm
Location: Malabang, Lanao del Sur

Re: Syntax error

Post by cocoking »

The module is working now. You are right (once again), esgici.
I thought #include "hmg.ch" is needed only in the main prg file.

Thank you very much, esgici.
Post Reply