Top-of-page format: STDOUT_TOP?? 
Author Message
 Top-of-page format: STDOUT_TOP??

In the man page for Perl 4.010, I find:

Quote:
>             record is written.  By default the top-of-page for-
>             mat is "top", but it may be set to the format of
>             your choice by assigning the name to the $^ vari-
>             able.  The number of lines remaining on the current

and

Quote:
>     $^      The name of the current top-of-page format for the
>             currently selected output channel.  Default is name
>             of the filehandle with "_TOP" appended.  (Mnemonic:
>             points to top of page.)

Now, this is what I have managed to get out of this:

- If you write to filehandle F, and the format 'F_TOP' is defined,
  then that is used. Otherwise, the format 'top' is used, if it
  exists.

- If you write to filehandle STDOUT, the format 'top' is used.
  If the format 'STDOUT_TOP' exists, it is ignored.

Why handle STDOUT differently from other filehandles?

Bjorn



Wed, 12 Jan 1994 07:18:57 GMT  
 Top-of-page format: STDOUT_TOP??
:
: In the man page for Perl 4.010, I find:
:
: >             record is written.  By default the top-of-page for-
: >             mat is "top", but it may be set to the format of
: >             your choice by assigning the name to the $^ vari-
: >             able.  The number of lines remaining on the current
:
: and
:
: >     $^      The name of the current top-of-page format for the
: >             currently selected output channel.  Default is name
: >             of the filehandle with "_TOP" appended.  (Mnemonic:
: >             points to top of page.)
:
: Now, this is what I have managed to get out of this:
:
: - If you write to filehandle F, and the format 'F_TOP' is defined,
:   then that is used. Otherwise, the format 'top' is used, if it
:   exists.
:
: - If you write to filehandle STDOUT, the format 'top' is used.
:   If the format 'STDOUT_TOP' exists, it is ignored.
:
: Why handle STDOUT differently from other filehandles?

It isn't different, which you can verify empirically:

    format top =
    top
    .
    format STDOUT_TOP =
    TOP
    .
    format STDOUT =
    OUT
    .
    write;
    write;

The first chunk of man page was unclear.  The $^ chunk was correct.
The "top" format is still grandfathered in, if FILEHANDLE_TOP isn't
defined, but consider "top" deprecated.

Never trust documentation.

Larry



Wed, 19 Jan 1994 07:44:32 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. variables in top-of-page formats

2. Forcing format to print top of page

3. Format for top of page; adding system date

4. Top of the page format problem

5. Top-of-page format

6. Question on top of page format

7. **FORMAT Formatting columns/pages

8. Writing Format top on demand

9. Consistent ps/top output format

10. Top format woes

11. write() not printing TOP format

12. Need documentation on (TOP) formats

 

 
Powered by phpBB® Forum Software