📄 tchkf.doc
字号:
TCHK 2.1 Page 1
Table of Contents
accum_dep - calculate accumulated depreciation ................ 8
ansi_call - create an ANSI escape sequence .................... 9
ansiback - convert DOS background code to ANSI ................ 11
ansifore - convert DOS foreground code to ANSI ................ 12
atrim - trims leading and trailing blanks ..................... 13
average - calculate the average of a set of reals ............. 14
beep - generate a standard IBM PC beep ........................ 15
bitrevb - bit reverse a byte .................................. 16
bitrevl - bit reverse a long .................................. 17
bitrevw - bit reverse a word .................................. 18
box - draw a box .............................................. 19
boxwindow - draw a 'window' ................................... 20
Cal... - family of Calendar date conversions .................. 22
CapsLock - set the Caps Lock key state ........................ 23
CEDadd - add a CED installable command ........................ 24
CEDremove - remove a CED installable command .................. 25
center - coordinate to center a message on screen ............. 26
changelitebar - set internal litebar menu .................... 27
Checksum_block - calculate checksum for a block ............... 28
clear - clears a portion of the screen ........................ 29
clear_typeahead - clear typeahead buffer ...................... 30
cls - clear screen ............................................ 31
color - make a single attribute ............................... 32
commit - flush disk buffers for to a handle ................... 33
Compaq386GetCpuSpeed - get cpu speed on a ..................... 34
Compaq386KbdType - keyboard type used by a .................... 35
Compaq386SetCpuSpeed - get cpu speed on a ..................... 36
CompaqExternalMonitorType - Get external monitor .............. 37
CompaqGetMasterMode - Get master mode of current .............. 38
CompaqGetMonitor - Get active monitor ......................... 39
CompaqInternalMonitorType - Get internal monitor .............. 40
CompaqModeSwitchDelay - Set mode switch delay ................. 41
CompaqSelectMonitor - Select active monitor ................... 42
CompaqSetMasterMode - Set master mode of current .............. 43
cpu_id - identify the cpu ..................................... 44
CRC16_block - calculate CRC-16 for a block .................... 45
CRC16tupdate - update a CRC-16 value via tables ............... 46
CRC16update - update a CRC-16 value ........................... 47
CRC32tupdate - update a CRC-32 value via tables ............... 48
cursor_blink - set speed of cursor blink ...................... 49
cursor_flip - toggle the cursor type .......................... 50
cursor_off - turn the cursor off .............................. 51
cursor_on - turn the cursor on ................................ 52
date_convert - convert date formats ........................... 53
dayofweek - find the day of the week .......................... 54
dayofyear - calculate the day of the year ..................... 55
daysleft - calculate the days left in the year ................ 56
ddatetofull - convert a date to full string ................... 57
ddatetoshort - convert a date to short string ................. 58
ddatetostr - convert a date to abbrev. string ................. 59
depreciation - calculate depreciation for a ................... 60
DESQapilevel - define minimum API level required .............. 61
TCHK 2.1 Page 2
DESQappnum - DESQview program number .......................... 62
DESQbeginc - begin critical section ........................... 63
DESQcommonmem - returns measure of common memory .............. 64
DESQconvenmem - returns measure of conventional ............... 65
DESQdisperror - popup a DESQview error window ................. 66
DESQendc - end critical section ............................... 67
DESQexit - exit program in DESQview ........................... 68
DESQexpandedmem - returns measure of expanded ................. 69
DESQgetbuf - get DESQview virtual screen info ................. 70
DESQgetmem - allocate DESQview "system" memory ................ 71
DESQiskmouse - is mouse emulated via keyboard ................. 72
DESQjustify - set automatic window justification .............. 73
DESQkmouse_off - disable keyboard mouse emulation ............. 74
DESQkmouse_on - enable keyboard mouse emulation ............... 75
DESQostack - switch to DESQview's internal stack .............. 76
DESQpause - give up CPU time .................................. 77
DESQpoke - displays a char on the status line ................. 78
DESQposttask - awaken DESQview task ........................... 79
DESQpushkey - put key into keyboard input stream .............. 80
DESQputmem - deallocate DESQview "system" memory .............. 81
DESQsound - makes a tone under DESQview ....................... 82
DESQstart - start (unFreeze) a task ........................... 83
DESQstop - stop (Freeze) the current task ..................... 84
DESQustack - switch back to program's stack .................. 85
DESQversion - DESQview version ................................ 86
diffddate - calculate the difference in 2 dates ............... 87
diskchanged - has the disk has been changed ................... 88
disktype - identify disk type ................................. 89
dosday - extract day from file date stamp ..................... 90
doshour - extract hour from file time stamp ................... 91
dosmonth - extract hour from file date stamp .................. 92
dosmin - extract minutes from file time stamp ................. 93
dossec - extract seconds from file time stamp ................. 94
dostimetolong - convert DOS time to 1/100 seconds ............. 95
dosyear - extract year from file date stamp ................... 96
double_decline_bal_dep - calculate double ..................... 97
DoubleDOSfreeCPU - give up CPU time under ..................... 98
DoubleDOSGetVirtual - get DoubleDOS virtual ................... 99
DoubleDOSTaskSwitch - set Double DOS task ..................... 100
EMMversion - version of Expanded Memory Manager ............... 101
EMSGetStatus - get Expanded Memory status ..................... 102
EMSinfo - determines EMM version and EMS pages ................ 103
EMSpages - determines the total and available ................. 104
EMSwarmbootprep - prepares the EMM for warm boot .............. 105
endstri - get offset to last char of a string ................. 106
endstrp - get pointer to last char of a string ................ 107
expandfilespec - expand a filespec into a full ................ 108
Extendedtotal - total Extended memory installed ............... 109
factorial - determines a factorial (n!) ....................... 110
fileexist - does a file exist ................................. 111
fname_match - compare filenames w/wildcards ................... 112
fncmp - compare filenames w/wildcards ......................... 113
frac - round the fractional portion of a real ................. 114
fsgn - sign of a real ......................................... 115
TCHK 2.1 Page 3
fulltoddate - convert a full date to struct ................... 116
FV - calculate the Future Value of a single amount ............ 117
FVa - calculate the Future Value of an annuity ................ 118
getAssignmemseg - get ASSIGN work area segment ................ 119
getBootBlock - get Boot Block ................................. 120
getBootBlock4 - get Boot Block under DOS 4.x .................. 121
getBPB - get Bios Parameter Block ............................. 122
getc_match - get specific input, case dependent ............... 123
getci_match - get specific input, case ........................ 124
getcursor - gets cursor scan lines ............................ 125
getdatehk - inputs a date from the keyboard ................... 126
getdouble - inputs a double from the keyboard ................. 127
getfilespec - get a DIR proper filespec ....................... 128
getfname - get a filename from the keyboard ................... 129
getget - get a string from the keyboard w/editing ............. 130
getint - inputs an integer from the keyboard .................. 133
getk - get a key .............................................. 134
getlogical - get Yes/No ....................................... 135
getpw - inputs a password from the keyboard ................... 136
getreal - inputs a real from the keyboard ..................... 137
getstr - input a string from the keyboard ..................... 138
GetTypePointDevice - Pointing Device BIOS ..................... 139
getVolSerialNum - get Volume Serial Number .................... 140
getyn - get Yes/No ............................................ 141
gotohv - move cursor to absolute coordinates .................. 142
Greg... - family of Gregorian date conversion ................. 143
horiz_line - draw a horizontal line ........................... 144
initkeyvars - setup internal keyboard settings ................ 145
inkey - get a key ............................................. 146
inkeyc - get a key, any alphabetics capitalized ............... 147
inkeycdv - get a key, any alphabetics ......................... 148
inkeydv - get a key, DESQview aware ........................... 149
intlen - calculate length of integer in a string .............. 150
InsLock - set the Insert key state ............................ 151
is2nd8259 - is a 2nd 8259 chip installed ...................... 152
isallalpha - are all characters in string ..................... 153
isallalphanum - are all characters in string .................. 154
isalllower - are all characters in string ..................... 155
isallupper - are all characters in string ..................... 156
isAnarkey - is ANARKEY.COM by Steven Calwas ................... 157
isAppendavail - is APPEND installed ........................... 158
isAssignavail - is ASSIGN installed ........................... 159
isAutoPark - is AUTOPARK.COM by Alan D. Jones ................. 160
isBlogical - is drive B: logical .............................. 161
isBREAKon - check Ctrl-BREAK flag ............................. 162
iscdevicemoderaw - is character device in "raw" ............... 163
isCEDavail - is CED installed ................................. 164
isCGA - is Color Graphics adapter installed ................... 165
isEGA - is Enhanced Graphics adapter installed ................ 165
isHerc - is Hercules Graphics adapter installed ............... 165
isMDA - is Monochrome adapter installed ....................... 165
ismono - is monochrome display ................................ 165
iscolor - is color display .................................... 165
isdate - character classification ............................. 166
TCHK 2.1 Page 4
isdir - is a FAT entry a subdirectory ......................... 167
isDoubleDOS - is DoubleDOS installed .......................... 168
isdrivelocal - is drive local or remote ....................... 169
isDriverSys - is DRIVER.SYS installed ......................... 170
isEMSavail - is EMS available ................................. 171
isEnhanceKbd - is an enhanced keyboard installed .............. 172
iseven - is a number even ..................................... 173
isExtended - is Extended memory installed ..................... 174
isfilename - character classification ......................... 175
isgameport - is a game port installed ......................... 176
isgn - sign of an integer ..................................... 177
ishandlelocal - is handle local or remote ..................... 178
isHiliteable - can a menu command be hilighted ................ 179
isInvisible - is this the invisible program under ............. 180
isleapyear - is a year a leap year ............................ 181
isMCA - is the bus Micro Channel Architecture ................. 182
ismouse - is a mouse installed ................................ 183
isNetwork - is a network installed ............................ 184
isNLSFuncCom - is NLSFUNC.COM installed ....................... 185
isNovellNetavail - is Novell Network installed ................ 186
isodd - is a number odd ....................................... 187
ispathname - character classification ......................... 188
ispcAnywhere - is pcAnywhere installed ........................ 189
isPRINTavail - is PRINT.COM installed ......................... 190
isPM - the the hour AM or PM .................................. 191
isrealtimeclock - is a real time clock installed .............. 192
isRedirectStdin - is stdin redirected ......................... 193
isRedirectStdout - is stdout redirected ....................... 194
isremoveable - is device removeable ........................... 195
isScrnSav2 - is SCRNSAV2.COM by Alan Ballard .................. 196
isShareavail - is SHARE installed ............................. 197
isstate - is string a state abbreviation ...................... 198
isVERIFYon - check VERIFY flag ................................ 199
isVidclock - is VIDCLOCK.COM by Tom Hanlin .................... 200
isWhoa - is WHOA!.COM by Brad Crandall installed .............. 201
iswildcarded - checks a string for DOS wildcards .............. 202
isXMSinstalled - is XMS installed ............................. 203
iszip - is a zip code valid for a state ....................... 204
joystickAx - read joystick input Ax ........................... 205
joystickAy - read joystick input Ay ........................... 206
joystickBx - read joystick input Bx ........................... 207
joystickBy - read joystick input By ........................... 208
joysticksettings - read joystick switch settings .............. 209
Jul... - family of Julian date conversion ..................... 210
keyclick - turn on key click .................................. 211
leftstr - return the left portion of a string ................. 212
litebar_alloc - allocate memory for a litebar ................. 213
litebar_free - frees memory allocated by a .................... 217
litebar_get - get user's choice from a litebar ................ 218
litehilite - hilite a litebar menu command .................... 219
litemessage - change the message for a litebar ................ 220
liteunlite - unhilite a litebar menu command .................. 221
longtodostime - convert 1/100 seconds to DOS time ............. 222
lpow - raise a base to an exponent ............................ 223
TCHK 2.1 Page 5
lsgn - sign of a long integer ................................. 224
ltrim - trims leading blanks .................................. 225
machine_id - determine machine type ........................... 226
MButtonPress - mouse button press data ........................ 227
MButtonRelease - mouse button release data .................... 228
MButtonStatus - mouse position and button status .............. 229
MCursorGraphic - define graphic cursor ........................ 230
MCursorOff - turns off (hide) the mouse cursor ................ 231
MCursorOn - turns on (show) the mouse cursor .................. 232
MCursorRangex - define horizontal cursor range ................ 233
MCursorRangey - define vertical cursor range .................. 234
MCursorText - define text cursor .............................. 235
MDriverSize - get driver storage requirements ................. 236
memory_strategy - get/set memory alloc strategy ............... 237
MEmulateLightpenOff - mouse light pen emulation ............... 238
MEmulateLightpenOn - mouse light pen emulation on ............. 239
menu_litebar - litebar style menu ............................. 240
menu_popup - popup style menu ................................. 241
MGetDisplayPage - get mouse display page number ............... 242
MGetDriver - save mouse driver state .......................... 243
MGetSensitivity - get mouse sensitivity ....................... 244
MGetVerType - get software version and mouse type ............. 245
MGotoxy - position mouse cursor ............................... 246
mid - is a number within a range .............................. 247
midstr - return the middle portion of a string ................ 248
MMickeysMovedx - number of mickeys mouse moved ................ 249
MMickeysMovedy - number of mickeys mouse moved ................ 250
monthexpand - convert a month abbrev to its name .............. 251
MouseReset - reset mouse software only ........................ 252
MPutDriver - restore mouse driver state ....................... 253
MSetDisplayPage - set mouse display page number ............... 254
MSetRatio - set mickey to pixel ratio ......................... 255
MSetSensitivity - set mouse sensitivity ....................... 256
MSetThreshold - set double speed threshold .................... 257
MUpdateScreen - define screen region for updating ............. 258
ndp_id - identify the math coprocessor ........................ 259
nmid - is a number outside a range ............................ 260
NumLock - set the Num Lock key state .......................... 261
parsefilename - parses a filename, supports paths ............. 262
parsefnameext - parses a filename into name and ............... 264
pause - wait for a time or until a keypress ................... 265
PMT - calculate the periodic payment required to .............. 266
popup_alloc - allocate memory for a popup menu ................ 267
popup_free - frees memory allocated by popup menu ............. 271
popup_get - get user's choice from a popup menu ............... 272
popup_restore - restore video from a popup menu ............... 273
popup_setcurrent - set internal popup menu .................... 274
pophilite - hilite a popup menu command ....................... 275
popunlite - unhilite a popup menu command ..................... 276
print_screen - issue a PrintScreen ............................ 277
PRINTadd - add a file to the print queue ...................... 278
PRINThold - hold print queue for status read .................. 279
PRINTpurge - remove all files from print queue ................ 280
PRINTremove - remove a file from print queue .................. 281
TCHK 2.1 Page 6
PRINTresume - resume printing after a PRINThold ............... 282
putk - put a character w/attribute on the screen .............. 283
putsay - put a string with attribute on the ................... 284
putstr - put string with attribute on the screen .............. 285
PV - calculate the Present Value of a single .................. 286
PVa - calculate the Present Value of an annuity ............... 287
radd - add two REAL numbers ................................... 288
rceil - rounds up ............................................. 289
rdiv - divide using REAL math ................................. 290
read_attrib - gets the attribute under the cursor ............. 291
read_char - gets the character under the cursor ............... 292
read_cursor - reads cursor information ........................ 293
read_mode - find screen width, mode and page .................. 294
reboot - reboots the machine .................................. 295
ResetPointDevice - Pointing Device BIOS Interface ............. 296
resolvepath - resolve a path to a fully qualified ............. 297
rfloor - rounds down .......................................... 298
rightstr - return the right portion of a string ............... 299
rnegate - change sign ......................................... 300
rnormalize - fix precision .................................... 301
ROM_date - gets the ROM id date ............................... 302
ROM_id - gets the ROM id byte ................................. 303
round - round a real to a decimal place ....................... 304
rsign - determine the sign of a REAL number ................... 305
rsub - subtract two REAL numbers .............................. 306
rtrim - trims trailing blanks ................................. 307
scrbuff - calculate size of screen buffer ..................... 308
scroll_down - scroll window down .............................. 309
scroll_up - scroll window up .................................. 310
ScrollLock - set the Scroll Lock key state .................... 311
set_color - set the default attribute (color) ................. 312
set_cursor - sets cursor scan lines ........................... 313
set_handles - set handle count ................................ 314
set_mode - set the video mode ................................. 315
setAutoPark - set parking delay for AUTOPARK.COM .............. 316
setBREAK - set Ctrl-BREAK flag ................................ 317
setcdevicemoderaw - set character device mode ................. 318
setcursor - sets cursor scan lines ............................ 319
SetpcAnywhere - enable/disable pcAnywhere ..................... 320
SetPointDevice - Pointing Device BIOS Interface: .............. 321
SetRatePointDevice - Pointing Device BIOS ..................... 322
SetResPointDevice - Pointing Device BIOS ...................... 323
settextinfo - set text mode video information ................. 324
setVERIFY - set VERIFY flag ................................... 325
setWhoa - set delay count for WHOA!.COM by Brad ............... 326
shadow - draw a shadowed box .................................. 327
shorttoddate - convert a short date to struct ................. 329
soundex - convert a string to soundex form .................... 330
sqr - square of a value ....................................... 332
stateindex - get index for a given state ...................... 333
stddev - calculate the standard deviation of a ................ 334
straight_line_dep - calculate straight line ................... 335
strcapital - capitalizes the first letter of each ............. 336
strclean - remove non-printable ASCII codes ................... 337
TCHK 2.1 Page 7
strcomma - convert a string to xx,xxx,xxx format .............. 338
strdel - delete part of a string .............................. 339
strfill - fill a string with a character ...................... 340
strins - insert one string into another ....................... 341
stroccur - count the occurences of a substring ................ 342
strpadleft - pad the left of a string ......................... 343
strpadright - pad the right of a string ....................... 344
strrep - replicate a char ..................................... 345
strshleft - shift string left ................................. 346
strshright - shift string right ............................... 347
strspace2tab - compress spaces to tabs ........................ 348
strtabexpand - expand tabs to spaces .......................... 349
strtocomma - convert a string to xx,xxx format ................ 350
strtoddate - convert a date string to a structure ............. 351
strtodol - converts a string to dollar format ................. 352
strtotime - convert a string to a time structure .............. 353
strwcmp - compares a wild-carded string to .................... 354
strwicmp - compares a wild-carded string to ................... 355
sum_year_digits_dep - calculate sum of the years .............. 356
summation - calculate a summation of integers ................. 357
swap - swap two values ........................................ 358
time_convert - convert time formats ........................... 359
timetostr - convert time structure to a string ................ 360
to24hour - converts hours to 24-hour format ................... 361
tocapkey - convert the key code to uppercase .................. 362
todosdate - make a DOS file date stamp ........................ 363
todostime - make a DOS file time stamp ........................ 364
tohour - converts 24-hour format to 12-hour ................... 365
Tone - play a tone ............................................ 366
uninstallWhoa - uninstall WHOA!.COM by Brad ................... 367
valid_date - check if a date is valid ......................... 368
variance - calculate the variance of a set of ................. 369
vert_line - draw a vertical line .............................. 370
whereh - X-coordinate of cursor .............................. 371
wherev - Y-coordinate of cursor .............................. 372
Index .............................................................. 373
TCHK 2.1 Page 8
Function accum_dep - calculate accumulated depreciation
Syntax double accum_dep(double cost, double salvage, int
life, int period, int dtype);
Prototype in finance.h
Remarks given the cost, salvage value and life of an item,
accum_dep will calculate the amount of accumulated
depreciation for the given period according to the
depreciation method specified by dtype. The cost and
salvage can be given in any unit (dollars, thousands
of dollars, etc.) but the life should be given in
depreciable periods (if you depreciate an item every
quarter, and the item has a life of 2 years, then
life should be 8).
The cost and salvage values should be in the same
units. The life and period should be given in the
same units.
Types of depreciation supported by the variable
dtype are:
1 - Straight line depreciation
2 - Sum of the years digits depreciation
3 - Double declining balance depreciation
Any other value for dtype will produce unpredictable
results.
No error checking is performed.
This is a generic function to calculate the
accumulated depreciation given all necessary
information. Any unnecessary information is ignored
(i.e. double declining balance does not need a
salvage value.)
Return value returns the amount of depreciation for the given
period in the same units as the cost, as per the
depreciation method specified by dtype.
Note The macros ACC_DDB(c,l,p), ACC_SLD(c,s,l) and
ACC_SYD(c,s,l,p) are defined in finance.h for ease
of use.
See also depreciation(), double_decline_bal_dep(),
straight_line_dep(), sum_year_digits_dep()
Example see demonum.c
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -