updating oE puts

puts

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

outputs text characters to a screen or file.

Parameters:
  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.
Errors:

The target file or device must be open.

Comments:

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:

print

Not Categorized, Please Help

Search



Quick Links

User menu

Not signed in.

Misc Menu