CMPUT101 Lecture Notes - Lecture 4: Dollar Sign

63 views2 pages

Document Summary

Cmput 114 lecture 4 references: literals, variables and. In a written program, we can"t draw shapes so we need to have some notation for referring to objects and values called a reference. There are different ways to reference objects & values in a. The simplest way is to use a literal in our code. A literal refers to the same object or value at all times. You can think of a literal as a nameplate that is automatically pre-bound to an object or value. In general, a literal is recognized by the compiler and is immediately translated into a language value or object. Common literals in programming languages include characters, numbers, and strings. Some objects cannot be referred to using literals. Sometimes we may want to rebind our nameplates. A variable is like a soft nameplate that may be attached to an object or value and may be re-attached to a different object or value in the future.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents

Related Questions