HP Pascal/iX Reference Manual (31502-90022)
Table Of Contents
- Top of Document
- Preface
- Chapter 1 Introduction
- Chapter 2 Language Elements
- Chapter 3 Data Types
- Chapter 4 Expressions
- Chapter 5 The Declaration Section
- Chapter 6 Statements
- Chapter 7 Program Structure
- Chapter 8 Procedures and Functions
- Chapter 9 Standard Routines
- Chapter 10 Input and Output
- Chapter 11 System Programming Extensions
- Chapter 12 Compiler Options
![](/manual/hp/mpe-ix-7-5-operating-system/hp-pascalix-reference-manual-31502-90022/images/img-181.png)
10- 25
11.0
11
1.9111099243164L+01
TRUE
TR
MAYBE
writedir
Usage
writedir
(f, k, e)
writedir
(f, k, e1, ..., en)
Parameter
f
A file variable opened in direct access state.
k
The integer index of a component of
f
.
e
An expression whose result type must be assignment compatible with
the components of
f
.
Description
The procedure writedir
(f, k, e)
places the current position at the
component of
f
specified by
k
, and then writes the value of
e
to that
component. It is equivalent to:
seek(f,k);
write(f,e)
An error occurs if
f
has not been opened in the direct-access state or if
k
is greater than maxpos
(f)
. After writedir executes, the buffer
variable
f
^ is undefined, and the current position is
k
+ n, where n is
from en.
Example
writedir(fil_var,indx,exp)
writedir(fil_var,indx,exp1,....,expn)
Illustration
Suppose file examp_file is a file of integer opened for direct access.
The current position is the third component. To write a number to the
first component, we call writedir: