Clicky

Fortran Wiki
trim (changes)

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

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

Description

Removes trailing blank characters of a string.

Standard

(削除) Fortran 95 and later (削除ここまで)(追記) 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

Revised on May 1, 2009 16:17:54 by Jason Blevins (152.3.10.27) (623 characters / 0.0 pages)
Edit | Back in time (2 revisions) | Hide changes | History | Views: Print | TeX | Source | Linked from: Intrinsic procedures, adjustl, adjustr

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