home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / bsd_srcs / share / doc / ps1 / 04.pascal / puman3.n < prev    next >
Encoding:
Text File  |  1991-04-17  |  21.9 KB  |  754 lines

  1. .\" Copyright (c) 1980 The Regents of the University of California.
  2. .\" All rights reserved.
  3. .\"
  4. .\" Redistribution and use in source and binary forms, with or without
  5. .\" modification, are permitted provided that the following conditions
  6. .\" are met:
  7. .\" 1. Redistributions of source code must retain the above copyright
  8. .\"    notice, this list of conditions and the following disclaimer.
  9. .\" 2. Redistributions in binary form must reproduce the above copyright
  10. .\"    notice, this list of conditions and the following disclaimer in the
  11. .\"    documentation and/or other materials provided with the distribution.
  12. .\" 3. All advertising materials mentioning features or use of this software
  13. .\"    must display the following acknowledgement:
  14. .\"    This product includes software developed by the University of
  15. .\"    California, Berkeley and its contributors.
  16. .\" 4. Neither the name of the University nor the names of its contributors
  17. .\"    may be used to endorse or promote products derived from this software
  18. .\"    without specific prior written permission.
  19. .\"
  20. .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  21. .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  22. .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  23. .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  24. .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  25. .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  26. .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  27. .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  28. .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  29. .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  30. .\" SUCH DAMAGE.
  31. .\"
  32. .\"    @(#)puman3.n    6.3 (Berkeley) 4/17/91
  33. .\"
  34. .if !\n(xx \{\
  35. .so tmac.p \}
  36. .if n 'ND
  37. .nr H1 2
  38. .NH
  39. Error diagnostics
  40. .PP
  41. This section of the
  42. .UM
  43. discusses the error diagnostics of the programs
  44. .PI ,
  45. .PC
  46. and
  47. .X .
  48. .I Pix
  49. is a simple but useful program which invokes
  50. .PI
  51. and
  52. .X
  53. to do all the real processing.
  54. See its manual section
  55. .IX
  56. (1)
  57. and section 5.2 below for more details.
  58. All the diagnostics given by
  59. .PI
  60. will also be given by
  61. .PC .
  62. .NH 2
  63. Translator syntax errors
  64. .PP
  65. A few comments on the general nature of the syntax errors usually
  66. made by Pascal programmers
  67. and the recovery mechanisms of the current translator may help in using
  68. the system.
  69. .SH
  70. Illegal characters
  71. .PP
  72. Characters such as `$', `!', and `@' are not part of the language Pascal.
  73. If they are found in the source program,
  74. and are not part of a constant string, a constant character, or a comment,
  75. they are considered to be
  76. `illegal characters'.
  77. This can happen if you leave off an opening string quote `\(aa'.
  78. Note that the character `"', although used in English to quote strings,
  79. is not used to quote strings in Pascal.
  80. Most non-printing characters in your input are also illegal except
  81. in character constants and character strings.
  82. Except for the tab and form feed characters,
  83. which are used to ease formatting of the program,
  84. non-printing characters in the input file print as the character `?'
  85. so that they will show in your listing.
  86. .SH
  87. String errors
  88. .PP
  89. There is no character string of length 0 in Pascal.
  90. Consequently the input `\(aa\(aa' is not acceptable.
  91. Similarly, encountering an end-of-line after an opening string quote `\(aa'
  92. without encountering the matching closing quote yields the diagnostic
  93. ``Unmatched \(aa for string''.
  94. It is permissible to use the character `#'
  95. instead of `\''
  96. to delimit character and constant strings for portability reasons.
  97. For this reason, a spuriously placed `#' sometimes causes the diagnostic
  98. about unbalanced quotes.
  99. Similarly, a `#' in column one is used when preparing programs which are to
  100. be kept in multiple files.
  101. See section 5.11 for details.
  102. .SH
  103. Comments in a comment, non-terminated comments
  104. .PP
  105. As we saw above, these errors are usually caused by leaving off a comment
  106. delimiter.
  107. You can convert parts of your program to comments
  108. without generating this diagnostic
  109. since there are two different kinds of comments \- those delimited by
  110. `{' and `}', and those delimited by `(*' and `*)'.
  111. Thus consider:
  112. .LS
  113. { This is a comment enclosing a piece of program
  114. a := functioncall;    (* comment within comment *)
  115. procedurecall;
  116. lhs := rhs;        (* another comment *)
  117. }
  118. .LE
  119. .PP
  120. By using one kind of comment exclusively in your program you can use
  121. the other delimiters when you need to
  122. ``comment out''
  123. parts of your program\*(dg.
  124. .FS
  125. \*(dgIf you wish to transport your program,
  126. especially to the 6000-3.4 implementation,
  127. you should use the character sequence `(*' to delimit comments.
  128. For transportation over the
  129. .I rcslink
  130. to Pascal 6000-3.4, the character `#' should be used to delimit characters
  131. and constant strings.
  132. .FE
  133. In this way you will also allow the translator to help by detecting
  134. statements accidentally placed within comments.
  135. .PP
  136. If a comment does not terminate before the end of the input file,
  137. the translator will point to the beginning of the comment,
  138. indicating that the comment is not terminated.
  139. In this case processing will terminate immediately.
  140. See the discussion of ``QUIT'' below.
  141. .SH
  142. Digits in numbers
  143. .PP
  144. This part of the language is a minor nuisance.
  145. Pascal requires digits in real numbers both before and after the decimal
  146. point.
  147. Thus the following statements, which look quite reasonable to
  148. .SM
  149. FORTRAN
  150. .NL
  151. users, generate diagnostics in Pascal:
  152. .LS
  153. .so digitsout
  154. .LE
  155. These same constructs are also illegal as input to the Pascal interpreter
  156. .I px .
  157. .SH
  158. Replacements, insertions, and deletions
  159. .PP
  160. When a syntax error is encountered in the input text,
  161. the parser invokes an error recovery procedure.
  162. This procedure examines the input text immediately after the point
  163. of error and considers a set of simple corrections to see whether they
  164. will allow the analysis to continue.
  165. These corrections involve replacing an input token with a different
  166. token,
  167. inserting a token,
  168. or replacing an input token with a different token.
  169. Most of these changes will not cause fatal syntax errors.
  170. The exception is the insertion of or replacement with a symbol
  171. such as an identifier or a number;
  172. in this case the recovery makes no attempt to determine
  173. .I which
  174. identifier or
  175. .I what 
  176. number should be inserted,
  177. hence these are considered fatal syntax errors.
  178. .PP
  179. Consider the following example.
  180. .LS
  181. % \*bpix -l synerr.p\fR
  182. .tr --
  183. .so synerrout
  184. %
  185. .LE
  186. The only surprise here may be that Pascal does not have an exponentiation
  187. operator, hence the complaint about `**'.
  188. This error illustrates that, if you assume that the language has a feature
  189. which it does not, the translator diagnostic may not indicate this,
  190. as the translator is unlikely to recognize the construct you supply.
  191. .SH
  192. Undefined or improper identifiers
  193. .PP
  194. If an identifier is encountered in the input but is undefined,
  195. the error recovery will replace it with an identifier of the
  196. appropriate class.
  197. Further references to this identifier will be summarized at the
  198. end of the containing
  199. .B procedure
  200. or
  201. .B function
  202. or at the end of the
  203. .B program
  204. if the reference occurred in the main program.
  205. Similarly,
  206. if an identifier is used in an inappropriate way,
  207. e.g. if a
  208. .B type
  209. identifier is used in an assignment statement,
  210. or if a simple variable
  211. is used where a
  212. .B record
  213. variable is required,
  214. a diagnostic will be produced and an identifier of the appropriate
  215. type inserted.
  216. Further incorrect references to this identifier will be flagged only
  217. if they involve incorrect use in a different way,
  218. with all incorrect uses being summarized in the same way as undefined
  219. variable uses are.
  220. .SH
  221. Expected symbols, malformed constructs
  222. .PP
  223. If none of the above mentioned corrections appear reasonable, the
  224. error recovery will examine the input 
  225. to the left of the point of error to see if there is only one symbol
  226. which can follow this input.
  227. If this is the case, the recovery will print a diagnostic which
  228. indicates that the given symbol was `Expected'.
  229. .PP
  230. In cases where none of these corrections resolve the problems
  231. in the input,
  232. the recovery may issue a diagnostic that indicates that the
  233. input is ``malformed''.
  234. If necessary, the translator may then skip forward in the input to
  235. a place where analysis can continue.
  236. This process may cause some errors in the text to be missed.
  237. .PP
  238. Consider the following example:
  239. .LS
  240. % \*bpix -l synerr2.p\fR
  241. .so synerr2out
  242. %
  243. .LE
  244. Here we misspelled
  245. .I output
  246. and gave a
  247. .SM FORTRAN
  248. style variable declaration
  249. which the translator diagnosed as a `Malformed declaration'.
  250. When, on line 6, we used `(' and `)' for subscripting
  251. (as in
  252. .SM FORTRAN )
  253. rather than the `[' and `]' which are used in Pascal,
  254. the translator noted that
  255. .I a
  256. was not defined as a
  257. .B procedure .
  258. This occurred because
  259. .B procedure
  260. and
  261. .B function
  262. argument lists are delimited by parentheses in Pascal.
  263. As it is not permissible to assign to procedure calls the translator
  264. diagnosed a malformed statement at the point of assignment.
  265. .SH
  266. Expected and unexpected end-of-file, ``QUIT''
  267. .PP
  268. If the translator finds a complete program, but there is more non-comment text
  269. in the input file, then it will indicate that an end-of-file was expected.
  270. This situation may occur after a bracketing error, or if too many
  271. .B end s
  272. are present in the input.
  273. The message may appear
  274. after the recovery says that it
  275. ``Expected \`.\'\|''
  276. since `.' is the symbol that terminates a program.
  277. .PP
  278. If severe errors in the input prohibit further processing
  279. the translator may produce a diagnostic followed by ``QUIT''.
  280. One example of this was given above \-
  281. a non-terminated comment;
  282. another example is a line which is longer than 160
  283. characters.
  284. Consider also the following example.
  285. .LS
  286. % \*bpix -l mism.p\fR
  287. .so mismout
  288. %
  289. .LE
  290. .NH 2
  291. Translator semantic errors
  292. .PP
  293. The extremely large number of semantic diagnostic messages which the translator
  294. produces make it unreasonable to discuss each message or group of messages
  295. in detail.
  296. The messages are, however, very informative.
  297. We will here explain the typical formats and the terminology used in the error
  298. messages so that you will be able to make sense out of them.
  299. In any case in which a diagnostic is not completely comprehensible you can
  300. refer to the
  301. .I "User Manual"
  302. by Jensen and Wirth for examples.
  303. .SH
  304. Format of the error diagnostics
  305. .PP
  306. As we saw in the example program above, the error diagnostics from
  307. the Pascal translator include the number of a line in the text of the program
  308. as well as the text of the error message.
  309. While this number is most often the line where the error occurred, it
  310. is occasionally the number of a line containing a bracketing keyword
  311. like
  312. .B end
  313. or
  314. .B until .
  315. In this case, the diagnostic may refer to the previous statement.
  316. This occurs because of the method the translator uses for sampling line
  317. numbers.
  318. The absence of a trailing `;' in the previous statement causes the line
  319. number corresponding to the
  320. .B end
  321. or
  322. .B until .
  323. to become associated with the statement.
  324. As Pascal is a free-format language, the line number associations
  325. can only be approximate and may seem arbitrary to some users.
  326. This is the only notable exception, however, to reasonable associations.
  327. .SH
  328. Incompatible types
  329. .PP
  330. Since Pascal is a strongly typed language, many semantic errors manifest
  331. themselves as type errors.
  332. These are called `type clashes' by the translator.
  333. The types allowed for various operators in the language are summarized on page
  334. 108 of the
  335. Jensen-Wirth
  336. .I "User Manual" .
  337. It is important to know that the Pascal translator, in its diagnostics,
  338. distinguishes between the following type `classes':
  339. .br
  340. .ne 8
  341. .TS
  342. center;
  343. lew(10) le le le le.
  344. array    Boolean    char    file    integer
  345. pointer    real    record    scalar    string
  346. .TE
  347. These words are plugged into a great number of error messages.
  348. Thus, if you tried to assign an
  349. .I integer
  350. value to a
  351. .I char
  352. variable you would receive a diagnostic like the following:
  353. .LS
  354. .so clashout
  355. .LE
  356. In this case, one error produced a two line error message.
  357. If the same error occurs more than once, the same explanatory
  358. diagnostic will be given each time.
  359. .SH
  360. Scalar
  361. .PP
  362. The only class whose meaning is not self-explanatory is 
  363. `scalar'.
  364. Scalar has a precise meaning in the
  365. Jensen-Wirth
  366. .I "User Manual"
  367. where, in fact, it refers to
  368. .I char ,
  369. .I integer ,
  370. .I real ,
  371. and
  372. .I Boolean
  373. types as well as the enumerated types.
  374. For the purposes of the Pascal translator,
  375. scalar
  376. in an error message refers to a user-defined, enumerated
  377. type, such as
  378. .I ops
  379. in the example above or
  380. .I color
  381. in
  382. .LS
  383. \*btype\fP color = (red, green, blue)
  384. .LE
  385. For integers, the more explicit denotation
  386. .I integer
  387. is used.
  388. Although it would be correct, in the context of the
  389. .I "User Manual"
  390. to refer to an integer variable as a
  391. .I scalar
  392. variable
  393. .PI
  394. prefers the more specific identification.
  395. .SH
  396. Function and procedure type errors
  397. .PP
  398. For built-in procedures and functions, two kinds of errors occur.
  399. If the routines are called with the wrong number of arguments a message similar to:
  400. .LS
  401. .so sinout1
  402. .LE
  403. is given.
  404. If the type of the argument is wrong, a message like
  405. .LS
  406. .so sinout2
  407. .LE
  408. is produced.
  409. A few functions and procedures implemented in Pascal 6000-3.4 are
  410. diagnosed as unimplemented in
  411. Berkeley
  412. Pascal, notably those related to
  413. .B segmented 
  414. files.
  415. .SH
  416. Can't read and write scalars, etc.
  417. .PP
  418. The messages which state that scalar (user-defined) types
  419. cannot be written to and from files are often mysterious.
  420. It is in fact the case that if you define
  421. .LS
  422. \*btype\fP color = (red, green, blue)
  423. .LE
  424. ``standard'' Pascal does not associate these constants with the strings
  425. `red', `green', and `blue' in any way.
  426. An extension has been added which allows enumerated types
  427. to be read and written, 
  428. however if the program is to be portable,
  429. you will have to write your own routines to perform these functions.
  430. Standard Pascal only allows the reading of characters, integers and real
  431. numbers from text files.
  432. You cannot read strings or Booleans.
  433. It is possible to make a
  434. .LS
  435. \*bfile of\fP color
  436. .LE
  437. but the representation is binary rather than string.
  438. .SH
  439. Expression diagnostics
  440. .PP
  441. The diagnostics for semantically ill-formed expressions are very explicit.
  442. Consider this sample translation:
  443. .LS
  444. % \*bpi -l expr.p\fP
  445. .so exprout
  446. %
  447. .LE
  448. This example is admittedly far-fetched, but illustrates that the error
  449. messages are sufficiently clear to allow easy determination of the
  450. problem in the expressions.
  451. .SH
  452. Type equivalence
  453. .PP
  454. Several diagnostics produced by the Pascal translator complain about
  455. `non-equivalent types'.
  456. In general,
  457. Berkeley
  458. Pascal considers variables to have the same type only if they were
  459. declared with the same constructed type or with the same type identifier.
  460. Thus, the variables
  461. .I x
  462. and
  463. .I y
  464. declared as
  465. .LS
  466. \*bvar\fP
  467.     x: ^ integer;
  468.     y: ^ integer;
  469. .LE
  470. do not have the same type.
  471. The assignment
  472. .LS
  473. x := y
  474. .LE
  475. thus produces the diagnostics:
  476. .LS
  477. .so typequout
  478. .LE
  479. Thus it is always necessary to declare a type such as
  480. .LS
  481. \*btype\fP intptr = ^ integer;
  482. .LE
  483. and use it to declare
  484. .LS
  485. \*bvar\fP x: intptr; y: intptr;
  486. .LE
  487. Note that if we had initially declared
  488. .LS
  489. \*bvar\fP x, y: ^ integer;
  490. .LE
  491. then the assignment statement would have worked.
  492. The statement
  493. .LS
  494. x^ := y^
  495. .LE
  496. is allowed in either case.
  497. Since the parameter to a
  498. .B procedure
  499. or
  500. .B function
  501. must be declared with a
  502. type identifier rather than a constructed type,
  503. it is always necessary, in practice,
  504. to declare any type which will be used in this way.
  505. .SH
  506. Unreachable statements
  507. .PP
  508. Berkeley
  509. Pascal flags unreachable statements.
  510. Such statements usually correspond to errors in the program logic.
  511. Note that a statement is considered to be reachable
  512. if there is a potential path of control,
  513. even if it can never be taken.
  514. Thus, no diagnostic is produced for the statement:
  515. .LS
  516. \*bif\fP false \*bthen\fP
  517.     writeln('impossible!')
  518. .LE
  519. .SH
  520. Goto's into structured statements
  521. .PP
  522. The translator detects and complains about
  523. .B goto
  524. statements which transfer control into structured statements (\c
  525. .B for ,
  526. .B while ,
  527. etc.)
  528. It does not allow such jumps, nor does it allow branching from the
  529. .B then
  530. part of an
  531. .B if
  532. statement into the
  533. .B else
  534. part.
  535. Such checks are made only within the body of a single procedure or
  536. function.
  537. .SH
  538. Unused variables, never set variables
  539. .PP
  540. Although
  541. .PI
  542. always clears variables to 0 at
  543. .B procedure
  544. and
  545. .B function
  546. entry,
  547. .PC
  548. does not unless runtime checking is enabled using the
  549. .B C
  550. option.
  551. It is
  552. .B not
  553. good programming practice to rely on this initialization.
  554. To discourage this practice, and to help detect errors in program logic,
  555. .PI
  556. flags as a `w' warning error:
  557. .IP
  558. .RS
  559. .HP 1)
  560. Use of a variable which is never assigned a value.
  561. .IP 2)
  562. A variable which is declared but never used, distinguishing
  563. between those variables for which values are computed but which are never
  564. used, and those completely unused.
  565. .RE
  566. .LP
  567. In fact, these diagnostics are applied to all declared items.
  568. Thus a
  569. .B const
  570. or a
  571. .B procedure
  572. which is declared but never used is flagged.
  573. The
  574. .B w
  575. option of
  576. .PI
  577. may be used to suppress these warnings;
  578. see sections 5.1 and 5.2.
  579. .NH 2
  580. Translator panics, i/o errors
  581. .SH
  582. Panics
  583. .PP
  584. One class of error which rarely occurs, but which causes termination
  585. of all processing when it does is a panic.
  586. A panic indicates a translator-detected internal inconsistency.
  587. A typical panic message is:
  588. .LS
  589. snark (rvalue) line=110 yyline=109
  590. Snark in pi
  591. .LE
  592. If you receive such a message, the translation will be quickly and perhaps
  593. ungracefully terminated.
  594. You should contact a teaching assistant or a member of the system staff,
  595. after saving a copy of your program for later inspection.
  596. If you were making changes to an existing program when the problem
  597. occurred, you may
  598. be able to work around the problem by ascertaining which change caused the
  599. .I snark
  600. and making a different change or correcting an error in the program.
  601. A small number of panics are possible in
  602. .X .
  603. All panics should be reported to a teaching assistant or systems
  604. staff so that they can be fixed.
  605. .SH
  606. Out of memory
  607. .PP
  608. The only other error which will abort translation when no errors are
  609. detected is running out of memory.
  610. All tables in the translator, with the exception of the parse stack,
  611. are dynamically allocated, and can grow to take up the full available
  612. process space of 64000 bytes on the \s-2PDP\s0-11.  On the \s-2VAX\s0-11,
  613. table sizes are extremely generous and very large (25000) line programs
  614. have been easily accommodated.  For the \s-2PDP\s0\-11, it is
  615. generally true that
  616. the size of the largest translatable program is directly related to
  617. .B procedure
  618. and
  619. .B function
  620. size.
  621. A number of non-trivial Pascal programs, including
  622. some with more than 2000 lines and 2500 statements
  623. have been translated and interpreted using
  624. Berkeley
  625. Pascal on \s-2PDP\s0-11's.
  626. Notable among these are the Pascal-S
  627. interpreter,
  628. a large set of programs for automated generation of
  629. code generators,
  630. and a general context-free parsing program which has been used to
  631. parse sentences with a grammar for a superset of English.
  632. In general,
  633. very large programs should be translated using
  634. .PC
  635. and the separate compilation facility.
  636. .PP
  637. If you receive an out of space message from the translator 
  638. during translation of a large
  639. .B procedure
  640. or
  641. .B function
  642. or one containing a large number of string constants
  643. you may yet be able
  644. to translate your program if you break this one
  645. .B procedure
  646. or
  647. .B function
  648. into several routines.
  649. .SH
  650. I/O errors
  651. .PP
  652. Other errors which you may encounter when running
  653. .PI
  654. relate to input-output.
  655. If
  656. .PI
  657. cannot open the file you specify,
  658. or if the file is empty,
  659. you will be so informed.
  660. .NH 2
  661. Run-time errors
  662. .PP
  663. We saw, in our second example, a run-time error.
  664. We here give the general description of run-time errors.
  665. The more unusual interpreter error messages are explained
  666. briefly in the manual section for
  667. .I px 
  668. (1).
  669. .SH
  670. Start-up errors
  671. .PP
  672. These errors occur when the object file to be executed is not available
  673. or appropriate.
  674. Typical errors here are caused by the specified object file not existing,
  675. not being a Pascal object, or being inaccessible to the user.
  676. .SH
  677. Program execution errors
  678. .PP
  679. These errors occur when the program interacts with the Pascal runtime
  680. environment in an inappropriate way.
  681. Typical errors are values or subscripts out of range,
  682. bad arguments to built-in functions,
  683. exceeding the statement limit because of an infinite loop,
  684. or running out of memory\*(dd.
  685. .FS
  686. \*(ddThe checks for running out of memory are not foolproof and there
  687. is a chance that the interpreter will fault, producing a core image
  688. when it runs out of memory.
  689. This situation occurs very rarely.
  690. .FE
  691. The interpreter will produce a backtrace after the error occurs,
  692. showing all the active routine calls,
  693. unless the
  694. .B p
  695. option was disabled when the program was translated.
  696. Unfortunately, no variable values are given and no way of extracting them
  697. is available.*
  698. .FS
  699. * On the \s-2VAX\s0-11, each variable
  700. is restricted to allocate at most 65000 bytes of storage (this is a
  701. \s-2PDP\s0-11ism that has survived to the \s-2VAX\s0.)
  702. .FE
  703. .PP
  704. As an example of such an error, assume that we have accidentally
  705. declared the constant
  706. .I n1
  707. to be 6, instead of 7
  708. on line 2 of the program primes as given in section 2.6 above.
  709. If we run this program we get the following response.
  710. .LS
  711. % \*bpix primes.p\fP
  712. .so primeout3
  713. %
  714. .LE
  715. .PP
  716. Here the interpreter indicates that the program terminated
  717. abnormally due to a subscript out of range near line 14,
  718. which is eight lines into the body of the program primes.
  719. .SH
  720. Interrupts
  721. .PP
  722. If the program is interrupted while executing
  723. and the
  724. .B p
  725. option was not specified,
  726. then a backtrace will be printed.\*(dg
  727. .FS
  728. \*(dgOccasionally, the Pascal system will be in an inconsistent
  729. state when this occurs,
  730. e.g. when an interrupt terminates a
  731. .B procedure
  732. or
  733. .B function
  734. entry or exit.
  735. In this case, the backtrace will only contain the current line.
  736. A reverse call order list of procedures will not be given.
  737. .FE
  738. The file
  739. .I pmon.out
  740. of profile information will be written if the program was translated
  741. with the
  742. .B z
  743. option enabled to
  744. .PI
  745. or
  746. .IX .
  747. .SH
  748. I/O interaction errors
  749. .PP
  750. The final class of interpreter errors results from inappropriate
  751. interactions with files, including the user's terminal.
  752. Included here are bad formats for integer and real numbers (such as
  753. no digits after the decimal point) when reading.
  754.