Compound Calculations And Parentheses - Radio Shack TRS-80 PC-3 Owner's Manual

Table of Contents

Advertisement

Compound Calculations and Parentheses
In performing the above calculations, you could have combined several of these operations into one step. For instance, you might
have typed both these operations on one line:
675+6750/45000
Compound calculations, however, must be entered very carefully:
675+6750/45000 might be interpreted as
675 + 6750
45000
or
675 +
6750
45000
When performing compound calculations, the
PC-3
has specific rules of expression evaluation and operator priority (see APPEN-
DIX D). Be sure you get the calculation you want by using parentheses to clarify your entries:
(675+6750)/45000
or
675 + (6750/45000)
To illustrate the difference that the placement of parentheses can make, try these two examples:
Input
(SHIFT)
CDw CD C]] GJ w CD C]] CID
(SHIFT)
CI)QJ
CDC]] CID CID CID
(ENTER)
Display
36
0.165
I

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents