HP3000-L Archives

November 2004, Week 1

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
donna garverick <[log in to unmask]>
Reply To:
Date:
Mon, 1 Nov 2004 16:01:27 -0800
Content-Type:
text/plain
Parts/Attachments:
text/plain (50 lines)
hi all!

here's an interesting one...  say you running a script with io
redirection:

    myscript < foo

pretty straight forward.  then say within 'myscript' another script is
called and that script too uses io redirection:

    myscript:  setvar myeof finfo('HPSTDIN','eof')
    myscript:  while setvar(myeof, myeof-1) > 0
    myscript:    cmd1
    myscript:    xeq script2 < bar
    myscript:    cmd2
    myscript:  endwhile

when control returns to 'myscript' eof for $stdin is (most likely,
depending on the behavior of 'script2') is going to be set to zero.
this has nothing to do with the contents  of the *variable*  that
'myscript' is (most likely) is using to act as a counter for foo's eof.
 that value is still correct.  if 'script2' did in fact read 'bar' to
eof, then the next 'read' (input) for 'myscript' will fail.

so -- is there a workaround?  i sure hope paul or jeff are
listening....         - d

=====
Donna Garverick     Sr. System Programmer
dgarverick -at- longs -dot- com
925-210-6631        Longs Drug Stores

Come, my friends, 'Tis not too late to seek a newer world.
Tho' much is taken, much abides; and tho'
We are not now that strength which in old days
Moved earth and heaven, that which we are, we are.
"Ulysses", A. Tennyson

>>>MY opinions, not Longs Drug Stores'<<<



__________________________________
Do you Yahoo!?
Check out the new Yahoo! Front Page.
www.yahoo.com

* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

ATOM RSS1 RSS2