updating oE puts


<built-in> procedure puts(integer fn, object text) 

outputs text characters to a screen or file.

  1. fn : an integer, the handle to an opened file or device
  2. text : an object, either a single character or a sequence of characters.

The target file or device must be open.


This procedures outputs, to a file or device, a single byte (atom) or sequence of bytes. The low order 8-bits of each value is actually sent out. If outputting to the screen you will see text characters displayed.

When you output a sequence of bytes it must not have any sub-sequences within it. It must be a sequence of atoms only. (Typically a string of ASCII codes).

Avoid outputting 0's to the screen or to standard output. Your output might get truncated.

Remember that if the output file was opened in text mode, Windows will change \n (10) to \r\n (13 10). Open the file in binary mode if this is not what you want.

Example 1:
include std/io.e 
puts(SCREEN, "Enter your first name: ") 
Example 2:
puts(output, 'A')  -- the single byte 65 will be sent to output 
See Also:


Not Categorized, Please Help


Quick Links

User menu

Not signed in.

Misc Menu