You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to clay-l...@googlegroups.com
I am back looking at Clay again and I am having trouble getting readByte() to work. The following cone snippet works:
var f1 = File("mbi-file-clay",READ);
var b = Byte();
read(f1,@b,1);
but how do I can the 'readByte()' function instead of the low-level 'read' one? I don't understand the 'Maybe' and 'nothing' constructs so that may be what I am missing. Any help would be appreciated. RD
Stepan Koltsov
unread,
Dec 7, 2012, 7:36:55 PM12/7/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to clay-l...@googlegroups.com
Something like this should work:
=== var f = File("/etc/passwd", READ); while (true) { var b = readByte(f); if (nothing?(b)) break; writeByte(stdout, just(b)); } ===