Clicky

Fortran Wiki
trim (Rev #2, changes)

Skip the Navigation Links | Home Page | All Pages | Recently Revised | Authors | Feeds | Export |

Showing changes from revision #1 to #2: (追記) Added (追記ここまで) | (削除) Removed (削除ここまで) | (削除) Chan (削除ここまで)(追記) ged (追記ここまで)

Description

Removes trailing blank characters of a string.

Standard

Fortran 95 and later

Class

Transformational function

Syntax

result = trim(string)

Arguments

  • string - Shall be a scalar of type character.

Return value

A scalar of type character which length is that of string less the number of trailing blanks.

Example

program test_trim
 character(len=10), parameter :: s = "gfortran "
 write(*,*) len(s), len(trim(s)) ! "10 8", with/without trailing blanks
end program

See also

adjustl, adjustr

category: (削除) Intrinsics (削除ここまで)(追記) intrinsics (追記ここまで)

Revision from April 30, 2009 17:31:26 by Jason Blevins
Forward in time (to current) | Back in time (1 more) | See current | Hide changes | History | Rollback | View: Source | Linked from: Intrinsic procedures, adjustl, adjustr

AltStyle によって変換されたページ (->オリジナル) /