194  Pascal Report  ord (x)  yields the ordinal  I  umber of x.  ehr  (i)  yields the  value of type Char h wing ordinal number  i. It  is an error  if no such value ex :,ts. If e  denotes a character value  then  ehr (ord (e) )  c  is always true.  suee (x)  yields the success('· of  x,  if any exists, in which case  ord(suee(x)):d(x)  +  1.  It is  an error if no  successor exists.  pred (x)  yields the  predeces~  or of  x,  if any exists, in which case  ord (pred (x) )  ,rd (x)  - 1.  It is an error if no  predecessor exists.  12.  Textfile Input and Output  The basis for legible input and out lut are textfiles (see Section 6.2.4)  that are passed as program paramders (see Section 13) to a Pascal  program and that in the program \  environment may represent some  input or output devices such as a ke  ,I  board, display, a magnetic tape, or  a line printer. In order to  facilita  I,'  the handling of textfiles, three  predeclared procedures (Readln,  VI  it eln, and Page) are introduced,  and two predeclared procedures  (d  d  and  w r i t  e  - see Section  11.4.1) are extended. The textfiles  hat these procedures apply to need  not represent input or output  devic~s,  but can also be local files. The  actual parameter lists for these procedures do not conform to the usual  rules (Section 11.3), allowing amon  2. other things for a variable number  of parameters. Moreover, the paran ,ders need not be of type Char, but  also may be of certain other types  in which case the data transfer is  accompanied by an  implicit data \.:ol1version  operation.  If  the first  parameter is a file variable, then tl i" is the file to be read or written.  Otherwise, the program parameter  ~  ,lput  and  Output  (see Section  13) are assumed for reading and w iting, respectively.  12.1  Read  When using  Read  on a textfile, the: ollowing rules apply. Let  f  denote  a textfile, and let  vI, ... ,vn deno\< variables possessing type Char or  Integer (or subrange of either) or  R  ,~al. 