I've recently installed HLA 1.59 on an XP box and a win98 box.

The XP box worked straight away (or at least after I'd got my head around the environment variables :)

However after setting up win98 HLA compiled my Hello.hla program OK (I could run the executable) but it flagged an error in the os.hhf library file.

Here's the error as seen in RadASM:

//hla "Hello.hla"
//Error in file "c:\hla\include\os.hhf" at line 4 :
//Expected ';', encountered 'namespace'.
//Near: << namespace >>
//
//Assembling: Hello.asm
//
//Make finished.

I checked os.hhf and my version (on both machines) read:

===================================================
#if( ! @defined( os_hhf ))
?os_hhf := true;


namespace os;

// Note: os.win32 and os.linux specify the operating system
// in use. This file must be manually edited as appropriate
// for use under Windows or Linux so these constants contain
// the appropriate values.

const
win32 := @global:true;
linux := !win32;

end os;


#endif
==================================================

After some experimenting I put a ; after the first line of the file on the win98 box so that the first 2 lines read:

==========================
#if( ! @defined( os_hhf ));
?os_hhf := true;
==========================

And now the file compiles OK:confused:

Is this just a quirk of win98 (obviously os.hhf relates to the operating system)?
Posted on 2003-11-28 03:53:12 by FlipR

And now the file compiles OK:confused:

Is this just a quirk of win98 (obviously os.hhf relates to the operating system)?


The only thing I can think of is that the last item in the file included *before* os.hhf needed a semicolon after it.
Can't understand why Win98 would make a difference, though.
Cheers,
Randy Hyde
Posted on 2003-11-30 00:05:58 by rhyde
actually, the same thing happens on win2k as well. thankx for the fix FlipR. Mebbe some conflict in the hla assembler syntax rules that would cause this?
Posted on 2003-12-27 15:23:44 by [NZ]Darkfire
Darkfire"]
actually, the same thing happens on win2k as well. thankx for the fix FlipR. Mebbe some conflict in the hla assembler syntax rules that would cause this?


Well, once the "solution" was posted, it hit me right away what the problem is.
This is a known problem in HLA due to the use of FLEX for the lexical analyzer
and the sneaky way the compile-time language is processed. As it turns out,
Flex requires some "non-compile-time statement" that it doesn't immediately process
to appear between the two statements. I'll go in and fix this in (all) the .hhf files.

The defect appears only when you include the .hhf files in certain sources.

Cheers,
Randy Hyde
Posted on 2003-12-29 10:51:31 by rhyde
I have downloaded and installed hlasetup.exe (HLA v1.60, released 12/26/2003) just yesterday. I am facing a similar problem with the hello world program given in Install.html. hla generates following output.
---------------------------------------------------------------
C:\hla\Projects\HW>hla hw
Error in file "c:\hla\include\os.hhf" at line 5 :
syntax error, unexpected namespaceTkn, expecting DoOneValStmt.
Near: << namespace >>
----------------------------------------------------------------
When I commented out {//#includeOnce( "os.hhf" )} in stdlib.hhf, the problem just moves ahead to hla.hhf and I get the following output
----------------------------------------------------------------
C:\hla\Projects\HW>hla hw
Error in file "c:\hla\include\hla.hhf" at line 5 :
syntax error, unexpected namespaceTkn, expecting DoOneValStmt.
Near: << namespace >>
----------------------------------------------------------------
I am working on win2k. All environmental variables are in place.
What could be the problem?
Posted on 2004-01-07 03:10:56 by wishwekar

I have downloaded and installed hlasetup.exe (HLA v1.60, released 12/26/2003) just yesterday. I am facing a similar problem with the hello world program given in Install.html. hla generates following output.
---------------------------------------------------------------
C:\hla\Projects\HW>hla hw
Error in file "c:\hla\include\os.hhf" at line 5 :
syntax error, unexpected namespaceTkn, expecting DoOneValStmt.
Near: << namespace >>
----------------------------------------------------------------
When I commented out {//#includeOnce( "os.hhf" )} in stdlib.hhf, the problem just moves ahead to hla.hhf and I get the following output
----------------------------------------------------------------
C:\hla\Projects\HW>hla hw
Error in file "c:\hla\include\hla.hhf" at line 5 :
syntax error, unexpected namespaceTkn, expecting DoOneValStmt.
Near: << namespace >>
----------------------------------------------------------------
I am working on win2k. All environmental variables are in place.
What could be the problem?


Seems to be a problem with your HW source file.
Did you cut & paste the code from the HTML file (never a good idea)? Or did you grab the electronic version from Webster? Most likely, the problem resides in the first statement of your main HW program (missing semicolon, illegal character, that kind of stuff).
Post the sources here so we can see.
Cheers,
Randy Hyde
Posted on 2004-01-07 10:45:40 by rhyde
That was quick...
Here is the source of HW


#include( "stdlib.hhf" )
begin HelloWorld;
stdout.put( "Hello, World of Assembly Language", nl );
end HelloWorld;
Posted on 2004-01-07 23:16:14 by wishwekar


program HelloWorld; // you need to declare "program" or "unit" (without quotes) as first line
#include( "stdlib.hhf" )

begin HelloWorld;
stdout.put( "Hello, World of Assembly Language", nl );
end HelloWorld;

Posted on 2004-01-07 23:28:32 by Kain
Thanks a lot Kain.....
It worked :alright:
Posted on 2004-01-08 00:00:50 by wishwekar