Use LEFT and RIGHT arrow keys to navigate between flashcards;
Use UP and DOWN arrow keys to flip the card;
H to show hint;
A reads text to speech;
27 Cards in this Set
- Front
- Back
Concept of "operation"
|
considered quite generally here; How is the quantity used? "being the subscript of array A" or "being the second parameter of procedure Position" are operations on quantity x (and A or Position as well). The point is that "integers" x and y are not of the same type if Position (x,y) is legal but Position (y,x) is nonsensical
|
|
Concept of "type"
|
Set of operations that can be applied to a quantity. Could the same set of operations be applied to the quantities in questions? If so, the types are thought to be the same. If there are operations that apply to a quantity in exclusion of others, the type of the quantity is different.
|
|
The 4 Naming Rules
|
1.-Quantities are named by their type possibly followed by a qualifier. i.e. : rowFirst
2.-Qualifiers distinguish quantities that are of the same type and that exist within the same naming context. 3.-Simple types are named by short tags that are chosen by the programmer. 4.-Names of constructed types should be constructed from the names of the constituent types. |
|
Standard type constructions
Pointer to X. |
pX
|
|
Standard type constructions
Difference between two instances of type X. X + dX is of type X. |
dX
|
|
Standard type constructions
Count of instances of type X. |
cX
|
|
Standard type constructions
An array of Ys indexed by X. Read as "map from X to Y." |
mpXY
|
|
Standard type constructions
An array of Xs. Read as "range X." The indices of the array are called: iX |
rgX
|
|
Standard type constructions
(rare) An array indexed by type X. The elements of the array are called: eX (rare) Element of the array dnX. |
dnX
|
|
Standard type constructions
A group of Xs stored one after another in storage. Used when the X elements are of variable size and standard array indexing would not apply. Elements of the group must be referenced by means other then direct indexing. A storage allocation zone, for example, is a grp of blocks. |
grpX
|
|
Standard type constructions
Relative offset to a type X. This is used for field displacements in a data structure with variable size fields. The offset may be given in terms of bytes or words, depending on the base pointer from which the offset is measured. |
bX
|
|
Standard type constructions
Size of instances of X in bytes. |
cbX
|
|
Standard type constructions
Size of instances of X in words. |
cwX
|
|
Standard qualifiers
The first element in an ordered set (interval) of X values. |
XFirst
|
|
Standard qualifiers
The last element in an ordered set of X values. XLast is the upper limit of a closed interval, hence the loop continuation condition should be: X <= XLast. |
XLast
|
|
Standard qualifiers
The strict upper limit of an ordered set of X values. Loop continuation should be: X < XLim. |
XLim
|
|
Standard qualifiers
Strict upper limit for all X values (excepting Max, Mac, and Nil) for all other X: X < XMax. If X values start with X=0, XMax is equal to the number of different X values. The allocated length of a dnx vector, for example, will be typically XMax. |
XMax
|
|
Standard qualifiers
The current (as opposed to constant or allocated) upper limit for all X values. If X values start with 0, XMac is the current number of X values. |
XMac
To iterate through a dnx array, for example: for x=0 step 1 to xMac-1 do ... dnx[x] ... or for ix=0 step 1 to ixMac-1 do ... rgx[ix] ... |
|
Standard qualifiers
A distinguished Nil value of type X. The value may or may not be 0 or -1. |
XNil
|
|
Standard qualifiers
Temporary X. An easy way to qualify the second quantity of a given type in a scope. |
XT
|
|
Some common primitive types
Flag (Boolean, logical). If qualifier is used, it should describe the true state of the flag. Exception: the constants fTrue and fFalse. |
f
|
|
Some common primitive types
Word with arbitrary contents. |
w
|
|
Some common primitive types
Character, usually in ASCII text. |
ch
|
|
Some common primitive types
Byte, not necessarily holding a coded character, more akin to w. Distinguished from the b constructor by the capital letter of the qualifier in immediately following. |
b
|
|
Some common primitive types
Pointer to first character of a zero terminated string. |
sz
|
|
Some common primitive types
Pointer to a string. First byte is the count of characters cch. |
st
|
|
Some common primitive types
pp (in heap). |
h
|