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
3- 12
real argument - abs ln sqr
arctan round sqrt
cos sin trunc
exp
real return - abs exp sqr
arctan ln sqrt
cos sin
Standard Procedures
prompt strread
read strwrite
readdir writedir
readln writeln
Example
PROGRAM show_realnum(output);
VAR
realnum: real;
BEGIN
realnum := 6.023E+23;
writeln(realnum);
END.
Output:
6.02300E+23
Longreal
The
longreal
type is a predefined, simple type that represents a subset
of the real numbers. This type may have more precision and a larger
range than the type
real
. The range the subset covers is implementation
dependent in HP Pascal. For more details see the
HP Pascal/iX
Programmer's Guide
or the
HP Pascal/HP-UX Programmer's Guide
, depending
on your implementation.
Permissible Operators
assignment :=
relational <, <=, =, <>, >=, >
arithmetic -, +, *, /
Standard Functions
longreal argument - abs round
arctan sin
cos sqr
exp sqrt
ln trunc
longreal return - abs ln
arctan sin