For Programmers: Free Programming Magazines  


Home > Archive > Fortran > August 2005 > Re: Count Items challenge









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: Count Items challenge
robin

2005-08-24, 3:57 am

David Frank wrote in message ...
>PL/I syntax does not support writing a single statement that scans a line
>once, and count the items in the line.



PL/I does. But Fortran doesn't.

A single-scan PL/I version is:

get string (trim(line)) list ((v do COUNT = 1 to length(line)));

>OTOH, my Count_Items function in
>http://home.earthlink.net/~davegemini/strings.f90
>does just that.


No it doesn't. It scans each character in the line TWICE,
and that means that it scans the line twice.








Sponsored Links







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

Copyright 2008 codecomments.com