HP3000-L Archives

October 1999, Week 3

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:
Per Ostberg <[log in to unmask]>
Reply To:
Date:
Tue, 19 Oct 1999 14:59:02 +0200
Content-Type:
text/plain
Parts/Attachments:
Meddelandetext (44 lines)
I think the 'eof'-var gets off by one, try and change the while-test to
'>=', as 'while setvar(eof,eof-1) >= 0 do'.
hth
/per
--------------------------------------------
Per Ostberg  / [log in to unmask]
phone +46-8-58581213 / fax +46-8-58587710
Huddinge University Hospital
ChemLab / C1 74 / S-141 86  HUDDINGE / SWEDEN
--------------------------------------------


> Hi all,
>
> I followed this thread with interest and on trying out one of the
techniques
> this is the result I get :-
>
> :PRINT DOIT
> setvar eof finfo(HPSTDIN,'eof')
> while setvar(eof,eof-1) > 0 do
>    input record
>    setvar user_code word(record)
>    setvar email_add word(record,,2)
>    echo !user_code !email_add
> endwhile
> deletevar record,user_code,email_add,eof
> :
> :PRINT DATA
> john         [log in to unmask]
> kevin        [log in to unmask]
> bill           [log in to unmask]
> :
> :DOIT < DATA
> john [log in to unmask]
> kevin [log in to unmask]
> :
> Any reason why I'm missing the last record in the file ?
>
> Thanks in advance,
>
> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
> - Kevin O'Sullivan                        Cosworth Racing Limited,  -

ATOM RSS1 RSS2