REBOL 3 Docs Guide Concepts Functions Datatypes Errors
  TOC < Back Next >   Updated: 6-Feb-2009 Edit History  

REBOL 3 Concepts: Ports: Writing to a Port

Pending Revision

This document was written for R2 and has yet to be revised for R3.

The insert function is used to write to a port.

insert fp "I was a fool to seek it."

If the port is buffered, the change will occur externally when the port is closed or updated (with the update function). If the port is opened with /direct, then the change will occur immediately.

All of the insert refinements can be used on the port. For example, to write 20 spaces into a port:

insert/dup fp " " 20

You can also use the remove, clear, change, append, replace, and other series modifying functions on the port.

For example, to remove a single character or a number of characters:

remove fp

remove/part fp 20

and to remove all remaining characters, write:

clear fp


  TOC < Back Next > REBOL.com - WIP Wiki Feedback Admin