trouble compiling instruction: console.puts(...



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.

.



Relevant Pages

  • Re: 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: ... console.puts instruction. ...
    (comp.lang.asm.x86)
  • Re: interesting use of NEXT SENTENCE vs. CONTINUE
    ... > the existence of an instruction to draw the proper comparison. ... > memory address pointed to by register based on the tested condition. ... > case is precisely the differing object code for the unconditional branch, ... Won't compile as is ... ...
    (comp.lang.cobol)
  • Re: Illegal instruction (core dumped)
    ... (snip regarding "Illegal instruction (core dumped)") ... > 1) overwriting the compiled code by writing to an invalid array ... any compile time errors. ...
    (comp.lang.fortran)
  • Re: "Interesting" C behaviours
    ... > compile to a single machine instruction. ... It was architecture dependent in K&R, ...
    (comp.lang.c)
  • Re: How to allow Visual Studio to open projects on a server?
    ... complaining that they need this ability. ... The developers can map the shared folders that their websites exist ... compile whatever is in those folders. ...
    (microsoft.public.dotnet.framework.aspnet)