An archive of as of Saturday January 26, 2019.

Is this a doc error?


In the "Stream" and "File" class docs on the left:

writen(value, type)

Example on the right:

data.writen('w', sample);

which would seem to relate to writen(type, value).

Which is it?


writen is a method of the Stream class. You use in on a Stream instance. For example:

// Create a blob instance
b <- blob();
// Write a word to the stream
b.writen(1234, 'w');
// Seek back to the first byte of the stream, 'b');
// Read the first word
print(b.readn('w') + "\n");

Well understood. Please reread my post. The documentation on your site has the arguments in the wrong order.


The example has them swapped. It should be data.writen(sample, 'w'). It should be fixed now.