[CSCI2321] Strange behavior of computer.ijs in class.
John Howland
jhowland at ariel.cs.trinity.edu
Mon Apr 24 11:14:17 CDT 2006
I have fixed the problems we experienced in class today when
we looked at the contents of computer.ijs and
http://www.cs.trinity.edu/About/The_Courses/cs2321/computer/
The problem was that last year, the J people changed the behavior
of names defined in a script using =. rather than =: . The behavior
now mimicks the behavior of use of =. (localized name assignment)
in an explicit definition.
In the file computer.ijs (in the class files directory) all function
definitions used =. rather than =: . I have changed that as noted
in the example below. Now require and script may be used as we
had been in other examples.
[jhowland at Ariel jhowland]$ cd cs2321
[jhowland at Ariel cs2321]$ j
require'computer.ijs '
trace
0
trace =: 1
pc =: 4
proc 0
pc= 4, ir= 0, ac= 0
mem= 0 0 0 0 307 108 409 22 3 0
22
proc 0
pc= 5, ir= 307, ac= 22
mem= 0 0 0 0 307 108 409 22 3 0
25
proc 1
pc= 6, ir= 108, ac= 25
mem= 0 0 0 0 307 108 409 22 3 0
pc= 7, ir= 409, ac= 25
mem= 0 0 0 0 307 108 409 22 3 25
invalid operation code
pc
8
_______________________________________________________________
John E. Howland url: http://www.cs.trinity.edu/~jhowland/
Computer Science email: jhowland at ariel.cs.trinity.edu
Trinity University voice: (210) 999-7364
One Trinity Place fax: (210) 999-7477
San Antonio, Texas 78212-7200
More information about the CSCI2321
mailing list