Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

VAXTPU STR — VMS 5.2

 STR

 Returns a string equivalent for an integer or the contents of a range or
 buffer.

 Syntax

    string1 := STR ({integer | range | buffer} [,string2])

 Parameters

    integer              A number for which you want to return a numeral of
                         type string.

    range                A range whose contents you want returned as a
                         string.

    buffer               A buffer whose contents you want returned as a
                         string.

    string2              Specifies how you want line ends represented.  The
                         default is the null character.  You can only use
                         string2 if you specify a range or buffer as the
                         first parameter.

 Examples

 1.  The following procedure converts two integer variables to strings so
     the current column and row can be displayed in the message area:

     PROCEDURE user_display_position
         what_col := GET_INFO (current_window, "current_column");
         what_row := GET_INFO (current_window, "current_row");
         MESSAGE ("Column " + STR (what_col) + ", Row " + STR (what_row));
     ENDPROCEDURE;

 2.  The following statement forms a string using the text in the range
     "this_range"; in the string, each end of line is represented with the
     string "<CR><LF>":

        this_string := STR (this_range, "<CR><LF>");

     For example, if the text in "this_range" was the following:

        You make the best of
        What's still around

     then "this_string" would contain the following:

        You make the best of<CR><LF>What's still around

 Related topics

    ASCII    FAO    INT    SUBSTR

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