An archive of community.esquilo.io as of Saturday January 26, 2019.

Is this a doc error?

rb1

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?

patrick

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.seek(0, 'b');
// Read the first word
print(b.readn('w') + "\n");
1234
rb1

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

Scott_Shumate

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