Changeset 35113 in project for wiki/man/5/Module (chicken port)


Ignore:
Timestamp:
02/10/18 16:16:04 (4 months ago)
Author:
sjamaan
Message:

man/5: Move port procedure documentation. Unit library is now empty!

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wiki/man/5/Module (chicken port)

    r34261 r35113  
    66This module contains various extended port definitions.
    77
    8 TODO:
    9 
    10 * Add {{port-closed?}}
    11 * Add {{port-name}}
    12 * Add {{port-position}}
    13 * Add {{port?}}
    14 * Add {{flush-output}}
    15 * Add {{get-output-string}}
    16 * Add {{open-input-string}}
    17 * Add {{open-output-string}}
    18 * Add {{set-port-name!}}
    19 * Add {{terminal-port?}}
    20 * Add {{terminal-name}}
    21 * Add {{terminal-size}}
    22 * What to do with {{make-bidirectional-port}}?
     8=== Port attributes
     9
     10==== port-name
     11
     12<procedure>(port-name [PORT])</procedure>
     13
     14Fetch filename from {{PORT}}. This returns the filename that was used to open
     15this file. Returns a special tag string, enclosed into parentheses for
     16non-file ports. {{PORT}} defaults to the value of {{(current-input-port)}}.
     17
     18
     19==== port-position
     20
     21<procedure>(port-position [PORT])</procedure>
     22
     23Returns the current position of {{PORT}} as two values: row and column number.
     24If the port does not support such an operation an error is signaled. This
     25procedure is currently only available for input ports. {{PORT}} defaults to the
     26value of {{(current-input-port)}}.
     27
     28
     29==== set-port-name!
     30
     31<procedure>(set-port-name! PORT STRING)</procedure>
     32
     33Sets the name of {{PORT}} to {{STRING}}.
     34
    2335
    2436=== Setting the file buffering mode
Note: See TracChangeset for help on using the changeset viewer.