Subject: | |
From: | |
Reply To: | |
Date: | Wed, 16 Jun 1999 11:39:14 -0700 |
Content-Type: | text/plain |
Parts/Attachments: |
|
|
Whoa - two answers in one day!
Arthur Frank wrote:
>
> My question, and please bear with me if this is *way* basic: how
> do I determine that my input file reached EOF? If I always used
> the same-named input file, that would be great (I could use FINFO
> to determine the # of lines until EOF). I guess I could rework
> the command file so that it accepts the input file as a parameter,
> which is copied to another name, which is then used as input...
> Ok, I'll probably do that, but I still want to know if I can
> determine EOF from the redirected input file. Call me curious.
Okay - you're "Curious".
Tad did it in his CNV125CF from the "File manipulation" thread:
> setvar n finfo (hpstdin,"eof")
> while setvar(n,n-1)>=0
> setvar rec!n input()
> endwhile
(by the way that was a *great* example of redirection!)
Enjoy!
+-------------------------------------------------------------------+
My mind is my own, as are my ideas and opinions.
My heart, body, and soul, however, all belong to others. Tim.
+-------------------------------------------------------------------+
Tim Ericson tericson DenKor Dental Management Corp.
Sr. Systems Analyst at denkor 503-526-4440 (my direct number)
(& Systems Manager) dot com http://www.denkor.com
Programming HP3000s since 1983! Quality dental care since 1970!
+-------------------------------------------------------------------+
UDCs and Command Files: http://www.denkor.com/hp3000/command_files
+-------------------------------------------------------------------+
|
|
|