|
|
 |
|
|
|
|
Short words, 9 |
|
|
|
 |
|
|
|
|
SHRT_MAX constant, 505, A5 |
|
|
|
 |
|
|
|
|
SHRT_MIN constant, 505, A5 |
|
|
|
 |
|
|
|
|
Shuffle function (CardDeck class), 1094-1095, 1099-1100 |
|
|
|
 |
|
|
|
|
Side effects |
|
|
|
 |
|
|
|
|
from assignment expressions, 209, 511-512 |
|
|
|
 |
|
|
|
|
from global variables, 401-404 |
|
|
|
 |
|
|
|
|
with increment and decrement operators, 512-513 |
|
|
|
 |
|
|
|
|
and interface design, 415-416 |
|
|
|
 |
|
|
|
|
from operator associativity,517 |
|
|
|
 |
|
|
|
|
from parameters, 343, 401-402, 415 |
|
|
|
 |
|
|
|
|
Sidebar comments, A33-A34 |
|
|
|
 |
|
|
|
|
Significant digits, 527-528, 530 |
|
|
|
 |
|
|
|
|
Signs |
|
|
|
 |
|
|
|
|
for exponents, 528 |
|
|
|
 |
|
|
|
|
for floating point numbers, 526-528 |
|
|
|
 |
|
|
|
|
Simple data types, 502-504 |
|
|
|
 |
|
|
|
|
versus structured, 592-593 |
|
|
|
 |
|
|
|
|
syntax template for, A15 |
|
|
|
 |
|
|
|
|
user-defined, 534-535 |
|
|
|
 |
|
|
|
|
Simula language, 908 |
|
|
|
 |
|
|
|
|
Simulations |
|
|
|
 |
|
|
|
|
playing cards, 1083-1090 |
|
|
|
 |
|
|
|
|
rock, paper, scissors game, 559-569 |
|
|
|
 |
|
|
|
|
solitaire game, 1090-1109 |
|
|
|
 |
|
|
|
|
sin function, 103, A7 |
|
|
|
 |
|
|
|
|
Single-entry/single-exit approach to functions, 340-341 |
|
|
|
 |
|
|
|
|
Single quotation mark (') |
|
|
|
 |
|
|
|
|
for char constants, 55, 59-60, 520-521 |
|
|
|
 |
|
|
|
|
escape sequence for, 521 |
|
|
|
 |
|
|
|
|
in input data, 136 |
|
|
|
 |
|
|
|
|
Single-stepping execution, 312 |
|
|
|
 |
|
|
|
|
sinh function, A7 |
|
|
|
 |
|
|
|
|
Size |
|
|
|
 |
|
|
|
|
of arrays, 602, 609, 1019 |
|
|
|
 |
|
|
|
|
of data types, 503-504 |
|
|
|
 |
|
|
|
|
of variables, 514-515 |
|
|
|
 |
|
|
|
|
sizeof operator, 514-515 |
|
|
|
 |
|
|
|
|
Skipping input characters, 141-142, 674 |
|
|
|
 |
|
|
|
|
Slash (/) |
|
|
|
 |
|
|
|
|
in assignment operators, 510 |
|
|
|
 |
|
|
|
|
in comments, 29, 70-71 |
|
|
|
 |
|
|
|
|
for division, 65-66 |
|
|
|
 |
|
|
|
|
precedence of, 94-95, 197, 516, A1 |
|
|
|
 |
|
|
|
|
Slicing problem, 927-928 |
|
|
|
 |
|
|
|
|
Slow motion execution, 312 |
|
|
|
 |
|
|
|
|
Smalltalk language, 162, 908 |
|
|
|
 |
|
|
|
|
Software, 17, 19 |
|
|
|
 |
|
|
|
|
Software engineering, 175 |
|
|
|
 |
|
|
|
|
Solitarie program, 1108-1109 |
|
|
|
 |
|
|
|
|
Solitaire simulation, 1090-1109 |
|
|
|
 |
|
|
|
|
Solution domain in object-oriented design, 931 |
|
|
|
 |
|
|
|
|
Sorting |
|
|
|
 |
|
|
|
|
complexity in, 667-668 |
|
|
|
 |
|
|
|
|
linked lists, 1082 |
|
|
|
 |
|
|
|
|
with pointers, 1003-1005, 1015-1018 |
|
|
|
 |
|
|
|
|
unordered lists, 653-657 |
|
|
|
 |
|
|
|
|
sortwithpointers.cpp file, 1015 |
|
|
|
 |
|
|
|
|
sortwithpointers.obj file, 1015 |
|
|
|
 |
|
|
|
|
SortWithPointers program, 1015-1018 |
|
|
|
 |
|
|
|
|
Source code files, 11-12 |
|
|
|
 |
|
|
|
|
hiding, 359-361 |
|
|
|
 |
|
|
|
|
separate compilation of, 859-861 |
|
|
|
 |
|
|
|
|
syntax template for, A12 |
|
|
|
 |
|
|
|
|
Spaces |
|
|
|
 |
|
|
|
|
in input data, 135, 138-139 |
|
|
|
 |
|
|
|
|
for readability, A36-A37 |
|
|
|
 |
|
|
|
|
in strings, 107-108, 672-675 |
|
|
|
 |
|
|
|
|
testing for, 413, A4 |
|
|
|
 |
|
|
|
|
Spacing in output, 106-108 |
|
|
|
 |
|
|
|
|
Special cases, testing, 308-309 |
|
|
|
 |
|
|
|
|
Specification files |
|
|
|
 |
|
|
|
|
for CardDeck class, 1094-1095 |
|
|
|
 |
|
|
|
|
for CardPile class, 1084-1085 |
|
|
|
 |
|
|
|
|
for Date class, 993-994 |
|
|
|
 |
|
|
|
|
for DateType class, 870-873 |
|
|
|
 |
|
|
|
|
for DynArray class, 1020-1022 |
|
|
|
 |
|
|
|
|
for ExtTime class, 914-917 |
|
|
|
 |
|
|
|
|
for OrdList class, 1058-1060 |
|
|
|
 |
|
|
|
|
for Player class, 1101-1102 |
|
|
|
 |
|
|
|
|
for RecordList class, 1005-1007 |
|
|
|
 |
|
|
|
|
for Time class, 939-941 |
|
|
|
 |
|
|
|
|
for TimeCard class, 941-942 |
|
|
|
 |
|
|
|
|
for TimeCardList class, 945-947 |
|
|
|
 |
|
|
|
|
for TimeType class, 852-854, 865-867 |
|
|
|
 |
|
|
|
|
Specifications of ADTs, 839-840 |
|
|
|
 |
|
|
|
|
Splitting lines, A36 |
|
|
|
 |
|
|
|
|
sqrt function, 103, 342, A7 |
|
|
|
 |
|
|
|
|
Square brackets ([ ]), 595-597, 709, 821-822 |
|
|
|
 |
|
|
|
|
srand function, 1096, A9 |
|
|
|
 |
|
|
|
|
Stack and recursion, 1124 |
|
|
|
 |
|
|
|
|
Standard input device, 133 |
|
|
|
 |
|
|
|
|
Standard library functions, 103-104 |
|
|
|
 |
|
|
|
|
Standard output device, 68 |
|
|
|
 |
|
|
|
|
Standards for programming languages, 11-12 |
|
|
|
 |
|
|
|
|
Starship program, 439-445 |
|
|
|
 |
|
|
|
|
Starship weight and balance case study, 433-445 |
|
|
|
 |
|
|
|
|
State variables, 271 |
|
|
|
 |
|
|
|
|
Statements |
|
|
|
 |
|
|
|
|
compound. |
|
|
|
 |
|
|
|
|
See Blocks |
|
|
|
 |
|
|
|
|
expression, 511 |
|
|
|
 |
|
|
|
|
syntax template for, 74-75, A13 |
|
|
|
 |
|
|
|
|
States |
|
|
|
 |
|
|
|
|
in finite state machines, 269-273 |
|
|
|
 |
|
|
|
|
of objects, 908 |
|
|
|
 |
|
|
|
|
Static arrays, 602 |
|
|
|
 |
|
|
|
|
Static binding, 925-926 |
|
|
|
 |
|
|
|
|
static reserved word, 398 |
|
|
|
 |
|
|
|
|
Static variables, 398-400 |
|
|
|
 |
|
|
|
|
stddef.h file, 975, A8 |
|
|
|
 |
|
|
|
|
stdlib.h file, 103, 1096, A8-A9 |
|
|
|
 |
|
|
|
|
Steps in algorithms, 283-286 |
|
|
|
 |
|
|
|
|
Stepwise refinement in program design, 152-156 |
|
|
|
 |
|
|
|
|
Storage, 16-18, 53 |
|
|
|
|
|