Skip to main content

The Programming Language BASIC

  • Chapter
  • 89 Accesses

Abstract

Here are the most important commands in BASIC (Commodore version):

  • ABS assigns a number its absolute value. Example: PRINT ABS(3) results in 3, PRINT ABS(-3) also results in 3.

  • AND combines two logical expressions so as to give the result of “true” if both expressions are “true.”

  • ASC assigns an ASCII number to a character. Example: PRINT ASC(“A”) results in 65.

  • CHR$ is the inverse function of ASC. Every integer between 0 and 255 is assigned its own ASCII character. Example: the command PRINT CHR$(65) produces the letter A.

  • CLR erases all variables (i.e., assigns to numerical variables the value of 0 and to character sequence variables the value of an empty sequence. It also flushes all dimension-alization of tables and subroutine addresses.

  • CONT continues the program run after hitting the stop button or after carrying out the commands STOP or END.

  • DATA/READ/RESTORE are commands that store and read data in a program.

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

Buying options

eBook
USD   24.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever

Tax calculation will be finalised at checkout

Purchases are for personal use only

Learn about institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 1982 Springer Science+Business Media New York

About this chapter

Cite this chapter

Baumann, R. (1982). The Programming Language BASIC. In: Hansen, T.S., Kahn, D. (eds) BASIC Game Plans. Birkhäuser, Boston, MA. https://doi.org/10.1007/978-1-4757-3918-3_10

Download citation

  • DOI: https://doi.org/10.1007/978-1-4757-3918-3_10

  • Publisher Name: Birkhäuser, Boston, MA

  • Print ISBN: 978-0-8176-3366-0

  • Online ISBN: 978-1-4757-3918-3

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics