Skip to main content

Abstract

A computer, unlike a calculator, can compare two pieces of information. It can decide whether a statement is true or false and then act accordingly. In order to do this the computer uses the command or keyword IF, found on key U, followed by the word THEN, on shifted key G. IF, like other commands, can be used only when the computer is in keyword mode; the cursor is a K. The command is simply saying that IF a certain statement is true THEN perform the next instruction in that line. See the example below which compares information by using the sign for equals (=) and the sign for not equals (<>).

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Author information

Authors and Affiliations

Authors

Copyright information

© 1985 Judith Miller

About this chapter

Cite this chapter

Miller, J. (1985). Comparisons. In: Beginning BASIC with the ZX Spectrum. Palgrave, London. https://doi.org/10.1007/978-1-349-81211-0_18

Download citation

Publish with us

Policies and ethics