Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

cat(1)

readfile(1F)        (Form and Menu Language Interpreter)       readfile(1F)

NAME
     readfile, longline - reads file, gets longest line

SYNOPSIS
     readfile file

     longline [file]

DESCRIPTION
     The readfile function reads file and copies it to stdout. No transla-
     tion of NEWLINE is done. It keeps track of the longest line it reads
     and if there is a subsequent call to longline, the length of that line
     (including the NEWLINE character) is returned.

     The longline function returns the length (including the NEWLINE char-
     acter) of the longest line in file. If file is not specified, it uses
     the file named in the last call to readfile.

EXAMPLES
     Here is a typical use of readfile and longline in a text frame defini-
     tion file:

             .
             .
             .
          text="`readfile myfile`"
          columns=`longline`
             .
             .
             .

DIAGNOSTICS
     If file does not exist, readfile returns FALSE (for example, the
     expression has an error return).

     longline returns 0 if a readfile has not previously been issued.

NOTES
     More than one descriptor can call readfile in the same frame defini-
     tion file. In text frames, if one of those calls is made from the text
     descriptor, then a subsequent use of longline will always get the
     longest line of the file read by the readfile associated with the text
     descriptor, even if it was not the most recent use of readfile.

SEE ALSO
     cat(1).









Page 1                       Reliant UNIX 5.44                Printed 11/98

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026