write("Before make_block")
text := make_block(x, y, z)
write(text[10])
write("After make_block")
The expected output according to the slides, should be:
Before make_block
After make_block
I get:
Before
make_block
Run-time error
106
File test-this.icn; Line
9
procedure or integer
expected
offending value:
&null
Traceback:
main()
&null((variable = "testing"),(variable = &null),(variable = &null))
from line 9 in test-this.icn
I'm using:
icont -V
Icon Version 9.4.3, November 14, 2005 (linux, i686.s, Mar 5 2010)
Is it because the slides were created using an older compiler?
--
"All things extant in this world,
Gods of Heaven, gods of Earth,
Let everything be as it should be;
Thus shall it be!"
- Magical chant from "Magical Shopping Arcade Abenobashi"
"Drizzle, Drazzle, Drozzle, Drome,
Time for this one to come home!"
- Mr. Wizard from "Tooter Turtle"
It isn't shown on Mitchell's slides.
Just before this example occurs, Michell writes:
Fact:
Unexpected failure is the root of madness.
So the error message seems to be the result of using an undeclared
procedure.
But why did I get an error message at runtime, with a halt in
execution, and Mitchell did not (according to his output). Unless the
procedure does need to be present, and he's referring to another
source of insanity. :)
I suspect that make_block is a procedure or record that produces an
object with fewer than 10 components. Try adding this declaration to
your code:
record make_block(x, y, z)
didn't work! Mitchell's "qei" choked on this expression.
Did you put it inside a procedure? It needs to be outside.
--
CaroleT
dnormandin@select-man:~/Programming/Icon/code$
./qei
Icon Expression Evaluator, Version 1.2, type :? for help
> record make_block(x, y, z);
File qei_.icn; Line 10 # "record": invalid expression list
File qei_.icn; Line 10 # ")": missing then
>
I can't even get to the rest of the code, because of the error above.
I like using Mitchell's "qei" because I can avoid the edit/compile/run
thing. Although using emacs, that fairly painless.
--
Duke