Please enable JavaScript.
Coggle requires JavaScript to display documents.
Programming Lenguage Basics (Environments and States (Identifier VS…
Programming Lenguage Basics
The Static/Dynimic Distiction
Static
Compile time
Determine the scope of a declaration by looking the program
Dynimic
Run time
Different declarations
Environments and States
Environment
Mapping from name to locations in the store
State
Mapping from locations in store to their values
Identifier VS Variable
Identifier
String of characters that refers to an entity
All identifiers are names, but not all names are identifiers
Variable
Refers to a particular location of the store
Static Scope and Block Structure
The scope of a declaration is determined by where the declaration appears in the program
Block is a grouping of declarations and statements. C uses {} to determine a block
Syntax allows blocks to be nested inside each other. This nesting property is referred to as
block structure
Explicit Access Control
Private
Scope that includes only the method declarations and definitions with that class and any friend classes.
Protected
Names are accesible to subclasses
Public
Access for everybody
Dynimic Scope
Only can be known when the program executes
Declarations and Definitions
Declaration
Type of things
Definition
Values of thins
Parameter passing mechanism
By value
The actual parameter is evaluated or copied
By reference
The address of the actual parameter is passed to the callee