Re: trouble compiling instruction: console.puts(...




"Bernie Woodham" <spamtrap@xxxxxxxxxx> wrote in message
news:HoadnQknDtbljbHYnZ2dnUVZ_vmdnZ2d@xxxxxxxxxxxxxxxx
I'm reading the AoA by Randy Hyde. In the chapter called
"IntegerArithmetic" he has a program called "testRandom" that illustrates
the use of the rand.range and rand.urange functions. What this program
does is prints a number of asterisks on your screen in a random pattern.

I thought I'd go ahead and run the program just to see what it looks like.
The code didn't seem very difficult.

However, I cannot compile the program. When I try I get the following
error:

============
Error in file "testRandom.hla" at line 22 [errid:55234/hlaparse.bsn]:
Expected ':' , encountered '('
<Possible undefined ID '.puts').
==============

So, the line it is complaining about is:

console.puts( ax, bx, "*" );

The lines immediately preceeding it are:

rand.urange( 0, 23);
//Print an asterisk at
//the specified coordinate on the screen.

console.puts( ax, bx, "*" );

So, I take it that for some reason I am unable to compile the
console.puts instruction. Just to experiment I typed in console.put and
then console.putsx.

Both times it complained about the same thing. put as an undefined ID and
putsx as an undefined ID.

The same program contained the console.cls(); instruction and that
compiled with no problem.

If this is a problem with the libraries I figure someone else would have
probably run into this problem also.

Anyone?

Thanks.


Well, thanks anyway. But yes, he updated the console.hff file to make it
more useful for both Windows and Linux. Thus some functions were removed.

.



Relevant Pages

  • trouble compiling instruction: console.puts(...
    ... does is prints a number of asterisks on your screen in a random pattern. ... I cannot compile the program. ... the line it is complaining about is: ... The same program contained the console.cls; instruction and that compiled ...
    (comp.lang.asm.x86)
  • Re: list reverse function
    ... you would have known that yourself had you bothered to compile before posting. ... suggesting a level of understanding that makes the absence of asterisks rather surprising. ...
    (comp.lang.c)
  • Re: list reverse function
    ... You need to examine the use of structures versus pointers to structures. ... Did you compile this? ... The asterisks were removed carelessly when I ... did replacement. ...
    (comp.lang.c)