Thread View: comp.lang.clu
1 messages
1 total messages
Started by Matti Jokinen
Thu, 08 Jun 1989 09:50
Istream bug
Author: 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.
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads