Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:

Advanced C 1992

.pdf
Скачиваний:
92
Добавлен:
17.08.2013
Размер:
4.28 Mб
Скачать

Part V • Appendixes

Table D.1. continued

Header file(s)

ANSI

Function prototype

string.h

ANSI

string.h

ANSI

string.h

 

string.h

 

string.h

ANSI

string.h

ANSI

time.h

 

stdlib.h

ANSI

string.h

ANSI

stdlib.h

ANSI

stdlib.h

ANSI

stdlib.h

ANSI

string.h

 

string.h

ANSI

stdlib.h

 

process.h & stdlib.h

ANSI

math.h

ANSI

math.h

ANSI

math.h

 

math.h

 

io.h

 

stdio.h

 

strpbrk( ) strrchr( ) strrev( ) strset( ) strspn( ) strstr( ) strtime( ) strtod( ) strtok( ) strtol( ) strtold( ) strtoul( ) strupr( ) strxfrm( ) swab( ) system( ) tan( ) tanh( ) tanhl( ) tanl( ) tell( ) tempnam( )

738

 

 

Function/Header File Cross Reference

C C C

 

 

 

 

CDC

 

 

 

 

C C C

 

 

 

 

C

 

 

 

 

 

 

 

Header file(s)

ANSI

Function prototype

 

 

 

 

 

 

 

 

time.h

ANSI

stdio.h

ANSI

stdio.h

ANSI

ctype.h

 

ctype.h & stdlib.h

ANSI

ctype.h & stdlib.h

ANSI

time.h

 

stdlib.h

 

io.h

 

stdio.h

ANSI

conio.h

 

io.h & stdio.h

 

stdarg.h

ANSI

stdarg.h

ANSI

stdarg.h

ANSI

stdio.h

ANSI

stdio.h

ANSI

stdio.h

 

stdio.h

ANSI

stdlib.h

ANSI

stdlib.h

ANSI

io.h

 

math.h

 

time( ) tmpfile( ) tmpnam( ) toascii( )

tolower( ) toupper( ) tzset( ) ultoa( ) umask( )

ungetc( ) ungetch( ) unlink( )

va_arg( ) va_end( ) va_start( ) vfprintf( ) vprintf( ) vsnprintf( )

vsprintf( ) wcstombs( ) wctomb( ) write( ) y0( )

continues

739

Part V • Appendixes

Table D.1. continued

Header file(s)

ANSI

Function prototype

math.h

math.h

math.h

math.h

math.h

y0l( )

y1( )

y1l( )

yn( )

ynl( )

740

Index

Symbols

# (stringize operator), 622-623 ##(token paste operator), 624 #@ (characterize operator), 623 #include statement, 166-167 % format specifier, 614

& operator, 66, 154 “ delimiter, 166

*argv[] parameter, 100

*envp[] parameter, 100

*indirection operator, 69 /Fa option, 437

/Fc option, 437 /Fl option, 437 /FPa option, 668

C CIndexCC C C

CCC

I C C C

C C C

C C C

A computer language would be ineffective if it did not offer a way

/FPc option, 668 /FPc87 option, 668 /FPi option, 669 /FPi87 option, 669 /Ox switch, 446

/S option, 437 < delimiter, 166 << operator, 154

=(assignment operator), 643

=operator, 74

== equality operator, 643 > delimiter, 166

>> operator, 154 [...] field, 619

\ (macro continuation operator), 622 \n newline character, 29

741

Advanced C

^ operator, 154

acos() function, 523

_ _DATE _ _macro, 637

ADDER.C program, 72-74

_ _FILE _ _macro, 638

AddRecord( ) function, 394

_ _FILE_ _ identifier, 500

addresses, I/O base, 296

_ _isascii(_c) macro, 504

alignment of data, 636

_ _LINE _ _macro, 638

allocating

_ _LINE_ _ identifier, 500

arrays, 244-247

_ _STDC _ _macro, 638

dynamic memory, 227

_ _TIME _ _macro, 637

memory, 516

_ _toascii(_c) macro, 504

alpha testing, 642

_fsopen() function, 269

Alternate Math Package Library

_tolower() function, 503

(mLIBCA.LIB), 668

_tolower(_c) macro, 504

ANSI (American National Standards

_toupper() function, 503

Institute), 4-5

_toupper(_c) macro, 504

ARCADE.C program, 282-287

| operator, 154

archive file attribute, 250

~ operator, 154

argc parameter, 100

1.23 constants, 27

arguments, command line, 99-100

1.23F constants, 27

Array parameter, 540, 544, 566

1.23L constants, 27

ARRAY1.C program, 49-51

123L constants, 26

ARRAY2.C program, 55-56

123U constants, 26

arrays, 46

123UL constants, 26

allocating, 244-247

16-bit programs, 658

as pointers, 55

32-bit programs, 658-659

bounds, 648

80x86

character, 56-58, 74-75

CPUs, 247

declarations, 46-47

instruction sets, 671-672

definitions, 47-48

A

index, 389

indexing, 48, 52-54

 

names, 68

 

abort() function, 517, 522

of pointers, 58-62

abs() function, 522

of structures, 195, 200

abstraction, 696

single-dimensional, 52

accessing

structures of, 200-202

dBASE files, 468-473

ASCII character set, 680

random strings, 252

asctime() function, 523

tree method, 321

asin() function, 524

742

Index

C C C

 

CCC

 

C

C

C

assembly language, 438

calling C functions, 451, 455 calling from C, 447

inline, 669 routine types, 437

assert() function, 524

assert() macro, 501, 650-652 ASSERT.C program, 651 assert.h header file, 501 assignment operator (=), 643 assignment within conditional

expression warning, 643 atan() function, 524 atan2() function, 525 atexit() function, 517, 525 atof() function, 526

atoi() function, 526 atol() function, 526 attributes, file

archive, 250 directory, 250 hidden, 250 normal, 250 read only, 250 system, 250

auto keyword, 7 automatic variables, 644 Average() function, 32

B

B-tree technique, 392-395 BADSTR.C program, 27-29 balance, 393

base 10 numbering system, 139-141 base parameter, 527

BASIC language, 437, 443

baud rate divisor register (LSB), 300

baud rate divisor register (MSB), 300 bDay variable, 471

beta testing, 642

bfHasMemo variable, 470 bfVERSION variable, 470 binary

files, 251-252

number system, 141-142 searches, 386, 426, 383-384

bit fields, 155-158

in structures, 206-208 storing, 208

bit operators, 154-155 bits, testing, 158 _BLANK identifier, 502 blank flags, 81

block comments, header, 16 bMonth variable, 471

Borland C++ compiler, 682-686 configuration options, 685 EasyWin program, 682

file conversion utility, 683 help system, 683

hot spot editor, 683 IDE, 685

import library generation tool, 683 make facility, 684

precompiled headers, 683 reducing storage requirements, 682 source code profiler, 683

Turbo Debugger, 683 UAE monitor, 683

window-monitoring facility, 683 Workshop program, 682

bounds, array, 648 break keyword, 8 breakpoints

memory, 655 program, 655

743

Advanced C

bsearch() function, 384, 517, 527 bsort() function, 384

BTREE.C program, 395-415 buffers, 90

BufferSize parameter, 536 bugs

automatic variables, 644 global variables, 644 improper array bounds, 648 macro side effects, 644 misused operators, 643 misused pointers, 649 operator precedence, 645-648 order of evaluation, 649 unititialized variables, 643 variable sizes and types, 645

building programs, 181 byDecimalPlace member, 473 bYear variable, 470

byLength member, 473 bytes, 143

deleted flag, 473 record status, 473 redundant, 670

C

c field, 607-608, 615

C functions, calling, 450 from assembly, 451, 455 from FORTRAN, 462 from Pascal, 462

C language

calling other languages from, 443, 449-450

assembly, 447 FORTRAN, 449-450

compilers, see compilers portability, 4

power of, 4 routine types, 437 standards, 3

C with classes, see C++ language C++ language, 695

classes, 714-715

declaring variables, 704-705 default parameter values, 706 overloading functions, 701-702 reference variables, 710

return values, 711 C/C++ compiler, 686-690

debugger, 687 DIALOG, 687

hot spot editor, 687 IDE, 687, 690 IMAGEDIT, 687

import library generation tool, 687 make facility, 688

online help system, 687 precompiled headers, 687 source code profiler, 687 SPY, 687

UAE monitor, 687 C_TIME category, 572

CALLASM.ASM program, 439-440 calling

C functions, 450

from assembly, 451, 455 from FORTRAN, 462 from Pascal, 462

conventions, 671 other languages

morf ,œ#r 21, 508

CHAR_MAX identifier, 21-22, 508

744

Index

C C C

 

CCC

 

C

C

C

CHAR_MIN identifier, 21, 508 character

arrays, 56-58, 74-75 constants, 26 literals, 623

string constants, 26 Character parameter, 547-551

CHARACTER_FIELD identifier, 472 characterize operator (#@), 623 characters

\n newline, 29 ASCII, 680

column definition, 472-473 multibyte, 517

newline, 251 whitespace, 550

chChar parameter, 558, 578, 586, 597-598

cin stream, 698 classes, 714-715

clearerr() function, 269, 528 Clipper compiler, 468 clock() function, 529

close( ) function, 279 code

MS-DOS function, 456-461 segments, 670

source profilers, 672 version, 470

writing in multiple languages, 435-436

Code Builder compiler, 659 Codeview debugger, 656 column definition

characters, 472-473 records, 471

combining languages, 435-436

data type compatibility, 463-465 naming considerations, 465 problems, 462-463

command line arguments, 99-100 commands

DOS DEBUG, 438

DOS MODE, 301 link, 165

common subexpression optimization, 666-667

communications ports, 296-301 Compact memory model, 673 Compare parameter, 527, 566 compare() function, 326 compilers, 681

Borland C++, 682-686 configuration options, 685 EasyWin program, 682 file conversion utility, 683 help system, 683

hot spot editor, 683 IDE, 685

import library generation tool, 683

make facility, 684 precompiled headers, 683 reducing storage requirements,

682

source code profiler, 683 Turbo Debugger, 683 UAE monitor, 683

window-monitoring facility, 683 Workshop program, 682

C/C++, 686-690 debugger, 687 DIALOG, 687

hot spot editor, 687 IDE, 687, 690

745

Advanced C

IMAGEDIT, 687

import library generation tool, 687

make facility, 688 online help system, 687

precompiled headers, 687 source code profiler, 687 SPY, 687

UAE monitor, 687 Clipper, 468

Code Builder, 659 Microway NDP C/C++, 659 minimums, 5

optimization, 660-662 QuickC for Windows, 690-692

advantages, 690 disadvantages, 691-692

Watcom C/386, 438, 659, 692-694 working processes, 621

Zortech C/C++, 659 compiling

multifile programs, 164 multiple source files, 162-163

conditional preprocessor directives, 634 console I/O, 280-281, 287

const keyword, 7, 500 const modifier, 25 constants, 25

character, 26 character string, 26 DBL_DIG, 506 DBL_EPSILON, 506

DBL_MANT_DIG, 506 DBL_MAX, 506 DBL_MAX_10_EXP, 506 DBL_MAX_EXP, 506 DBL_MIN, 506

DBL_MIN_10_EXP, 506 DBL_MIN_EXP, 507 double-floating-point, 27 entering, 21 float-floating-point, 27 FLT_DIG, 507 FLT_EPSILON, 507 FLT_MANT_DIG, 507 FLT_MAX, 507 FLT_MAX_10_EXP, 507 FLT_MAX_EXP, 507 FLT_MIN, 507 FLT_MIN_10_EXP, 507 FLT_MIN_EXP, 507 FLT_RADIX, 507 FLT_ROUNDS, 507 int, 26

LDBL_DIG, 507 LDBL_EPSILON, 507 LDBL_MANT_DIG, 507 LDBL_MAX, 507 LDBL_MAX_10_EXP, 507 LDBL_MAX_EXP, 508 LDBL_MIN, 508 LDBL_MIN_10_EXP, 508 LDBL_MIN_EXP, 508

long double-floating-point, 27 long int, 26

SEEK_CUR, 515

SEEK_END, 515

SEEK_SET, 515 unsigned int, 26

constructors, 714 continue keyword, 8

_CONTROL identifier, 502 conventions, calling, 671 conversions, data type, 45

746

Index

C C C

 

CCC

 

C

C

C

converting

macros to strings, 622 strings, 516

Coprocessor Library (mLIBC7.LIB), 668

CopyItem() function, 395, 423 cos() function, 529

cosh() function, 530 cout stream, 698 cprintf() function, 281 cputs() function, 281 creat() function, 279

CREATEDB.C program, 209-212 creating

character literals, 623 dBASE files, 484, 493 identifiers, 499 libraries, 182

nodes, 423 root node, 420

temporary work files, 256 cscanf() function, 281 ctime() function, 530 ctype.h header file, 502-504

_CUSTNAME structure, 359

D

d field, 608, 615 data

alignment, 636

B-tree storing technique, 392-395 files, 321

objects, see variables segments, packing, 670

data types char, 20

conversions, 45 double, 20 float, 20 identifiers

floating-point, 22-25 int type, 21-22

int, 20 modifiers

long, 20 short, 20 unsigned, 20

databases, 467-468 DATE_FIELD identifier, 472 DB3HEADER structure, 483 dBASE, 467

accessing files, 468-473 files

creating, 484, 493 reading, 474 updating, 494 version codes, 470

interfacing with, 468

main header structure, 469-470 DBGSTRNG.C program, 652-654 DBL_DIG constant, 506 DBL_DIG identifier, 22 DBL_EPSILON constant, 506 DBL_EPSILON identifier, 23 DBL_MANT_DIG constant, 506 DBL_MANT_DIG identifier, 23 DBL_MAX constant, 506 DBL_MAX identifier, 23 DBL_MAX_10_EXP constant, 506 DBL_MAX_10_EXP identifier, 23 DBL_MAX_EXP constant, 506 DBL_MAX_EXP identifier, 23 DBL_MIN constant, 506 DBL_MIN identifier, 23

747