home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.whtech.com
/
ftp.whtech.com.tar
/
ftp.whtech.com
/
club100
/
ref
/
ba01d.do
< prev
next >
Wrap
Text File
|
2006-10-19
|
3KB
|
74 lines
Title: KEYBOARD INPUT
The function of input is to capture environmental data and digitize it.
Environmental data, also known as analog data, is data that has not been
previously digitized. The process of digitization is one of converting analog
data into a form represented by a binary code. A binary code is a set of
one's and zero's, purposely designed to represent analog conditions.
The binary code most used in computing today is ANSI standard ASCII (American
National Standards Institute, American Standard Code for Information
Interchange). ANSI ASCII was designed for our communications industry in the
late 50's. ANSI, originally designed ASCII around 7 one's and zero's called
binary digits (BITS). These 7 bits are used to represent the alphabet (A-Z,
a-z), base 10 characters (0-9), special characters (~!@#$"'<>,.?/, etc), and
control characters (like carrier return, line feed, clear screen, cursor
movement, etc.).
Seven bit ASCII represents 2^7 or 128 characters. These are called the
"standard" ASCII characters. However, today's ASCII includes an 8th bit, 2^8
or 256 possible combinations, thus adding a second 128 combinations. This
second set is called "non-standard" ASCII, or the extended ASCII character
set. Included in this second set are graphic, foreign, and other characters.
Not being standardized by ANSI, this second set differs in its analog
representation between computer manufacturers.
All characters may be represented in one of 5 different manners, i.e. 1)
decimal (base 10), 2) hexadecimal (base 16), 3) binary (base 2), 4) the
single keyboard character, and 5) key-combination necessary to create the
given character.
INKEY$
Returns the string value of the key currently pressed, if any. If no key is
pressed, the function returns a null character (0 in decimal, 00 in
hexadecimal). In either case, BASIC doesn't wait for keyboard input, but
goes to the next statement.
INPUT"prompt";variablelist
Prints prompt on the screen, then stops execution of your program until you
enter data from the keyboard.
INPUT$(numericexpression)
Returns a string of numericexpression characters from the keyboard. INPUT$
accepts all keys as input except SHIFT/BREAK and doesn't echo (print on the
screen) your input.
KEYfunctionkeynumber,stringexpression (in BASIC only)
Defines functionkeynumber as stringexpression.
KEYLIST
List the current definitions for the function keys on the screen.
KEY(functionkeynumber)ONorOFForSTOP
Enables of disables the functionkey interrupt.
LINEINPUT"prompt";stringvariable
Prints prompt on the screen, then stops execution of your program until you
enter a string from the keyboard, then assigns that string to stringvariable.
ONKEYGOSUBlinenumberlist
Defines interrupts for the function keys. Upon pressing the nth function
key, BASIC jumps to the nth line number in linenumberlist.
<EOF>