Hi,All!
There is something wrong with includes when unit is compiled. Consider the following example.
unit unitbug_u;
#include("test.hhf");
end unitbug_u;
and file test.hhf:
val
_aaa_: dword := 100;
endval;
hla produces an error:
syntax error, unexpected endvalTkn.
Near: << endval >>
If val and endval is replaced by const and endconst then:
syntax error, unexpected ';'.
Near: << ; >>
and if semicolon is removed from #include("test.hhf") then everything compiles ok.
Problem with semicolon appears also in compilation of "program" files. But problem with val - only in units.
Also i want to ask: is ";" needed after #include or not? In HLA documentation #include apeears with semicolon.

Sorry for my bad english. :-)
Posted on 2004-05-25 03:34:03 by Elohim Meth

Hi,All!
There is something wrong with includes when unit is compiled. Consider the following example.
unit unitbug_u;
#include("test.hhf");
end unitbug_u;
and file test.hhf:
val
_aaa_: dword := 100;
endval;
hla produces an error:
syntax error, unexpected endvalTkn.
Near: << endval >>
If val and endval is replaced by const and endconst then:
syntax error, unexpected ';'.
Near: << ; >>
and if semicolon is removed from #include("test.hhf") then everything compiles ok.
Problem with semicolon appears also in compilation of "program" files. But problem with val - only in units.
Also i want to ask: is ";" needed after #include or not? In HLA documentation #include apeears with semicolon.

Sorry for my bad english. :-)


Note that a semicolon is not necessary after the #include directive. Usually, you can get away with it because HLA is fairly liberal about allowing semicolons in the source file, but this is not universally true. So get in the habit of *not* placing semicolons after the #include directive.
Cheers,
Randy Hyde
Posted on 2004-05-25 09:31:55 by rhyde
Thanks for reply but...
test.hhf:
val
_aaa_: dword := 100;
endval;

1) What about endval problem in units?
unit unitbug_u;
#include("test.hhf")
end unitbug_u;
still gets an error message: "unexpected endvalTkn."

2)with such test program
program testprg;
#include("test.hhf")
#include("w.hhf")

begin testprg;
end testprg;

threre is also an error:
Error in file "d:\hla\include\w.hhf" at line 1 :
syntax error, unexpected ';'.
Posted on 2004-05-25 09:47:05 by Elohim Meth

Thanks for reply but...

threre is also an error:
Error in file "d:\hla\include\w.hhf" at line 1 :
syntax error, unexpected ';'.


The problem is in w.hhf. Same problem, btw.
First line is:



#if( !@defined( w_hhf ));


It really ought to be



#if( !@defined( w_hhf ))

Cheers,
Randy Hyde
Posted on 2004-05-25 22:43:44 by rhyde