Len is a inquiry function for CHARACTER variables and arrays.
The len function will return the length of a character variable or array. In other words, it will tell you how many characters can be stored in a character variable or in an element of a character array.
String can be the name of either a character variable or the name of a character array.
Note: The function needs to output to a variable of type INTEGER.
There are no optional arguments.
If you had declared the following character variables:
character*20 grapes(100), word*12
And then passed them to the len function in the following code:
i = len(grapes) j = len(word)
Then i would contain the value of 20 and j would contain the integer 12.
lecture twenty five
examples: plot2.f and charvar.f
Written by Jason Wehr : email@example.com and Maintained by John Mahaffy : firstname.lastname@example.org