Silverfrost Logo About Us | Contact Us
 

TRIMR@

Platform

x64, Win32

Purpose

To rotate a character string right until there are no trailing blanks.

Syntax

SUBROUTINE TRIMR@(X)
CHARACTER (LEN=*) X

Notes

If the string is blank, it is left unchanged.
The standard intrinsic function ADJUSTR can be used instead.

Example

    PROGRAM READ_NAMES
    ! Read names from a file and print them right justified.
    CHARACTER (LEN=10)::NAME
   OPEN(FILE='NAMES',UNIT=10)
    DO
     READ (10,'(A)',END=999) NAME
     CALL TRIMR@(NAME)
     PRINT *,NAME
    END DO
999 END PROGRAM READ_NAMES

 

 

Copyright © 1999-2017 Silverfrost Limited