home *** CD-ROM | disk | FTP | other *** search
- ComSoft #1
- Clipper Library
- Documentation
-
- COMSOFT1.LIB is Copyright 1988 by
- Bruce E. Farrington
- All Rights Reserved
-
- The COMSOFT1.LIB library is an enhancement library for
- inclusion and use with the Nantucket Corporation CLIPPER(r) Summer
- 87 compiler.
- The functions within the library may be used in commercial
- software without license or royalty as long as the library is NOT
- the major component of the software and that the library itself is
- not distributed with the commercial software. For commercial
- software, the library may only be distributed as part of a standard
- executable file (.EXE).
-
-
- Disclaimer
-
- The COMSOFT1.LIB library is distributed "as is". The
- COMSOFT1.LIB library may contain errors, which could cause
- unexpected results and loss of data or productivity. In no case are
- any warranties, express or implied made by the author. In no event
- will the author be liable for any consequential, direct, or
- indirect damages for the failure of the library or the functions
- contained therein to perform any function. It is the sole
- responsibility of the user to ascertain the suitability and
- functionality of the software to perform any task.
-
-
- The COMSOFT1.LIB library may NOT be posted on any Bulletin
- Board or Time Sharing Network other than the NANTUCKET SIG of
- Compuserve.
-
-
-
- CLIPPER is a registered Trademark of Nantucket Corporation
- CLIPTRAP Sets a time out timer and character(s) to stuff into the
- keyboard buffer if the timer expires. Must be used in
- conjunction with CLIPOFF function. This function is used
- to set a time out on a READ command and can be used to
- push a READ terminate key into the keyboard buffer.
-
- Syntax <expL> = CLIPTRAP(<expN>,<expC>)
-
- <expL> Should always return true. If <expL> returns
- false the function did not execute properly.
-
- <expN> Is the number of seconds to wait before time
- out.
-
- <expC> Is the character(s) to stuff into the
- keyboard buffer if a time out occurs. Extended
- characters are preceded by CHR(0) and followed by
- the proper keyboard scan code. Normal characters
- are entered as themselves. Maximum characters in
- <expC> cannot be greater than 15.
-
- Example
- CLEAR
- inx1 = SPACE(4)
- @ 5, 0 SAY "What is the input"
- @ 6, 0 GET inx1
- xx = CLIPTRAP(30,CHR(0)+CHR(81))
- READ
- zz = CLIPOFF()
- IF zz
- @ 7, 0 SAY "The timer expired"
- ENDIF
- aa = INKEY()
- RETURN
-
- This example will wait 30 seconds for input from the
- READ command. If the 30 seconds expires a Page Down
- will be forced into the keyboard buffer. The Page
- Down will terminate the READ. A logical TRUE
- returned from CLIPOFF() indicates that the timer has
- expired.
-
- Special Considerations
- The CLIPTRAP() and CLIPOFF() functions MUST be used
- in pairs as they set and reset internal interrupt
- vectors.
-
- CLIPOFF Determines if CLIPTRAP() function caused a time out and
- placed the characters from the CLIPTRAP function into the
- keyboard.
-
- Syntax <expL> = CLIPOFF()
-
- <expL> Returns TRUE if CLIPTRAP timed out, otherwise
- returns FALSE.
-
- Example
-
- See CLIPTRAP() example.
-
-
- CAPS Toggles Caps Lock to off if it is on, and on if it is
- off.
-
- Syntax CAPS()
-
- Example
-
- CAPS()
-
-
- CAPSOFF Turns off Caps Lock
-
- Syntax CAPSOFF()
-
- Example
-
- CAPSOFF()
-
-
- CAPSON Turns on Caps Lock
-
- Syntax CAPSON()
-
- Example
-
- CAPSON()
-
-
- NUM Toggles Num Lock to off if it is on, and on if it is off.
-
- Syntax NUM()
-
- Example
-
- NUM()
-
- NUMOFF Turns off Num Lock
-
- Syntax NUMOFF()
-
- Example
-
- NUMOFF()
-
-
- NUMON Turns on Num Lock
-
- Syntax NUMON()
-
- Example
-
- NUMON()
-
-
- ABENDW Forces computer to a warm start condition.
-
- Syntax ABENDW()
-
- Example
-
- ABENDW()
-
-
- ABENDC Forces computer to a cold start condition
-
- Syntax ABENDC()
-
- Example
-
- ABENDC()
- KBSTAT Determines if Scroll Lock, Num Lock, Caps Lock, or Insert
- keys are active.
-
- Syntax <expL> = KBSTAT(<expN>)
-
- <expL> Returns a logical TRUE if the key is active,
- otherwise returns a logical FALSE.
-
- <expN> Is a numeric value in the range of 1, 2, 3,
- or 4.
- 1 - Test Scroll Lock
- 2 - Test Num Lock
- 3 - Test Caps Lock
- 4 - Test Insert Key
-
- Example
-
- CLEAR
- xx = KBSTAT(2)
- IF xx
- @ 1, 0 SAY "The Num Lock was on"
- ELSE
- @ 1, 0 SAY "The Num Lock was Not on"
- ENDIF
- RETURN
-
- This example will test for the Num Lock key and
- display a message on the screen indicating the key
- status.