Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

VAXTPU READ_FILE — VMS 5.2

 READ_FILE

    Reads a file you specify, adding its contents before the current line
    in the current buffer; optionally returns a string containing the file
    specification of the file to be read.  VAXTPU displays a message
    indicating how many records (lines) were read.

 Syntax

    [string2 :=] READ_FILE (string1)

 Parameters

    string1 Specifies the file you want to read into the current buffer.

 Examples

    1.  READ_FILE ("sys$login:login.com");

        Reads the file LOGIN.COM, adding its contents to the current
        buffer.

    2.  The following procedure creates a second window and a second
        buffer, maps the window to the screen, and prompts the user to
        specify the file to include in the buffer:

        PROCEDURE user_edit_second_file
           window2 := CREATE_WINDOW (1, 10, ON);
           buffer2 := CREATE_BUFFER ("second_buffer");
           MAP (window2, buffer2);
           READ_FILE (READ_LINE ("Enter file name for 2nd window: "));
           POSITION (BEGINNING_OF (buffer2));
        ENDPROCEDURE;

 Related topics

    CREATE_BUFFER CURRENT_BUFFER   MOVE_TEXT   WRITE_FILE

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