Article View: comp.lang.clu
Article #37Istream bug
From: Matti Jokinen
Date: Thu, 08 Jun 1989 09:50
Date: Thu, 08 Jun 1989 09:50
41 lines
2000 bytes
2000 bytes
Description: The compiler believes that istream$can_read and
istream$can_write are undefined and that istream$set_date has only
one argument. The bug is in the machine-independent part of the
compiler and presumably occurs in all implementations.
Repeat-by: Compile the following program:
p = proc(s: istream)
if istream$can_write(s) cor istream$can_read(s) then
s.date := now()
end
end p
Fix: The bug is in the file ~clu/cmp/basic.types. The module itself,
defined in ~clu/lib/clu/istream, is correct. Make the following changes
to ~clu/cmp/basic.types and reinitialize the compiler:
1254,1255c1254,1256
< istream = cluster is open, empty, reset, flush, get_date, set_date,
< get_name, close, abort, is_closed, equal, similar, copy
---
> istream = cluster is open, can_read, can_write, empty, reset, flush,
> get_date, set_date, get_name, close, abort,
> is_closed, equal, similar, copy
1262a1264,1269
> can_read = proc (ist: istream) returns (bool)
> end can_read
>
> can_write = proc (ist: istream) returns (bool)
> end can_write
>
1275c1282
< set_date = proc (ist: istream) signals (not_possible(string))
---
> set_date = proc (ist: istream, new_date: date) signals (not_possible(string))
In Unix systems you don't need to recompile or relink anything. Remove
~clu/cmp/state.N, where N is the version number, type `clu' and when the
prompt appears type `kill'. In DEC-20 you must first relink the compiler
unless you saved the uninitialized version when you rebuilt the compiler
last time.
Technical Details
Message-ID:
<903@tucos.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!cs.utexas.edu!uunet!mcvax!kth!draken!tut!tucos!mojShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!cs.utexas.edu!uunet!mcvax!kth!draken!tut!tucos!moj From: moj@tucos.UUCP (Matti Jokinen) Newsgroups: comp.lang.clu Subject: Istream bug Message-ID: <903@tucos.UUCP> Date: 8 Jun 89 09:50:24 GMT Distribution: inet Organization: University of Turku, Finland Lines: 41 Approved: moj@cs.utu.fi X-Posting-Number: 45 X-Note: Articles 41-44 were erroneously numbered as 40-43