LEN_TRIM: Trimmed length of a character string or of an array (f)
⇒Help
⇒Contents
⇒Strings
trimmed_length_of_string = LEN_TRIM(string) ! length of string without counting trailing blanks
examples:
CHARACTER
str*100/"abc"/
trimmed_length_of_str = LEN_TRIM(str) ! 3
len_hello = LEN_TRIM("hello ") ! = 5
trimmed_length_of_array = LEN_TRIM(array) ! length of array without counting trailing zeros
examples:
DIMENSION
vector(10), matrix(3,4)
vector = 0 ! set all elements to 0
trimmed_length_of_vector = LEN_TRIM(vector) ! 0
vector = (101,102,103) ! assignment to the first 3 elements
trimmed_length_of_vector = LEN_TRIM(vector) ! 3
matrix =
$
! assign 1, 2, .. 12 to matrix
trimmed_length_of_matrix = LEN_TRIM(matrix) ! 12
len_hello = LEN_TRIM("hello ") ! = 5
⇒ Length of a character string or of an array
©2000-2008 Georg Petrich, HicEst Instant Prototype Computing. All rights reserved.
Impressum