C:\hla\Projekte>hla setoputputattr.hla
Error in file "setoputputattr.hla" at line 14 [errid:77199/hlaparse.bsn]:
Expected ':', encountered '('
(Possible undefined ID '.setOutputAttr').
Near: << ( >>
HLAPARSE assembly failed with 1 errors
Can anybody tell me why i get the "undefined ID .setOutputAttr. I am sure the script is fine and i am using the stdlib.hhf.
The odd thing is that i can actually compile other scripts like the "Hello World" etc.
Please help
possibly you need to include console.hhf
it may be significant to include it before or after stdlib.hhf, can't remember which.
hey man thanks for the answer.
i tried that but the same error appears.
ah. the function is defined in "win32cons.hhf" and the namespace is win32cons.
i am trying everything believe me. Exactly as the book, but it doesn't work.
The problem seems to have started when i used console.gotoxy and then console.setOutput etc. Seems to like the console command doesn't work so i have propably done something wrong during configuration, but what i can't get to find out.
Please help
ok, can you post the entire source your trying to build?
program testsetOutputAttr;
#include( "stdlib.hhf" );
var
x:uns32;
y:uns32;
begin testsetOutputAttr;
//Pastrojme ekranin
console.cls();
console.setOutputAttr( win.fgnd_LightRed | win.bgnd_Black );
stdout.put
(
nl,
"HLA console.setOutputAttr Test Routine", nl,
"--------------------------------------", nl,
nl,
"Press Enter key to continue:"
);
stdin.readLn(); //kerkon qe te shtypet Enter.
console.setOutputAttr( win.fgnd_Yellow | win.bgnd_Blue );
stdout.put
(
" ", nl
"In blue and yellow ", nl,
" ", nl,
"Press enter to continue", nl
" ", nl
nl
);
stdin.readLn();
//Kthejme tekstin ne bardh e zi.
console.setOutputAttr( win.fgnd_White | win.bgnd_Black );
end testsetOutputAttr;
okay, found some outdated code in the win32console.hhf file.
the corrected file is attached.
this is the corrected setoutputattr file.
program testsetOutputAttr;
#include( "stdlib.hhf" )
#include( "win32cons.hhf")
var
x:uns32;
y:uns32;
begin testsetOutputAttr;
//Pastrojme ekranin
console.cls();
win32cons.setOutputAttr( win.fgnd_LightRed | win.bgnd_Black );
stdout.put
(
nl,
"HLA win32cons.setOutputAttr Test Routine", nl,
"--------------------------------------", nl,
nl,
"Press Enter key to continue:"
);
stdin.readLn(); //kerkon qe te shtypet Enter.
win32cons.setOutputAttr( win.fgnd_Yellow | win.bgnd_Blue );
stdout.put
(
" ", nl
"In blue and yellow ", nl,
" ", nl,
"Press enter to continue", nl
" ", nl
nl
);
stdin.readLn();
//Kthejme tekstin ne bardh e zi.
win32cons.setOutputAttr( win.fgnd_White | win.bgnd_Black );
end testsetOutputAttr;
dont' forget to link in "wincons.lib" on the command line.
Hey man thank you very much for the help so far. I am most grateful.
Just one more question. How do i link wincons.lib
i tryed with Link command but i am not sure what to do , so please can you tell me how do i do it with the respective commands.
Thank you very much again.
just add wincons.lib on the command line.
eg:
hla myprogram wincons.lib
Still not working.
Does it have to do that i have a link.exe v 5.60 Dec 1994???
If so where can i download i more recent version?
cheers
that shouldn't be an issue. what kind of problem are you experiencing?
If the linker displays Microsoft (R) Segmented Executable Linker Version 5.60.339 Dec 5 1994, it is a 16-bit linker.
Microsoft (R) Incremental Linker Version 5.12.8078
Copyright (C) Microsoft Corp 1992-1998. All rights reserved.
usage: LINK [options] [files] [@commandfile]
i dowloaded another linker, but yes the other linker was exactly as you wrote down.
Maybe because it was a 16 bit linker it didn't work correctly.