For Programmers: Free Programming Magazines  


Home > Archive > Fortran > November 2005 > Re: TRIM









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: TRIM
James Giles

2005-11-16, 7:02 pm

Richard E Maine wrote:
....
>
> Except, of course, for the case where str is completely blank. Since
> zero-length strings were non-standard in f77, it required special-case
> handling whenever you might encounter them. In my old f77 equivalents
> of this, I tended to fudge by returning 1 as the "trimmed" length of a
> blank string. [...]


Yes, and under those ground-rules, I suppose I'd have to
write:

STR(1:MAX(LTRIMG(STR),1))

But your're right.

--
J. Giles

"I conclude that there are two ways of constructing a software
design: One way is to make it so simple that there are obviously
no deficiencies and the other way is to make it so complicated
that there are no obvious deficiencies." -- C. A. R. Hoare


Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com