Problems with file-handling an new GPC Beta_(re)

Wed, 8 Oct 1997 10:54:12 -0700 (PDT)



This sounds like a "performance bug" at least.  Typically, opening and
closing a file are relatively "expensive" system calls while a "reset"
should be cheap.  If you had to perform "close then open" operations on
a lot of files or many times during the life of a process, then performance
of the process and of the system would be less then if only a "reset"
were required.

Jesper Lund said:
> Date: Wed, 08 Oct 1997 18:19:06 +0100 (MET)
> From: Jesper Lund 
> Subject: Re: Problems with file-handling an new GPC Beta
> To: chris 
> Cc: gpc@hut.fi
> 
> Chris:
> 
> You need to close the file before calling reset.  If you add 
> 
>   close(f) just before  reset(f)
> 
> your program works fine.  Whether this is a *feature* or a *bug* depends on
> the definitions of reset/rewrite in the (various) Pascal standard(s).  But it
> sounds logical to me that you should close a file prior to opening it for
> reading.

-- 
George B. Smith
Stratus Western Development Center
gbs@swdc.stratus.com


George B. Smith (gbs@swdc.stratus.com)

HTML conversion by Lluís de Yzaguirre i Maura
Institut de Lingüística Aplicada - Universitat "Pompeu Fabra"
e-mail: de_yza@upf.es