home *** CD-ROM | disk | FTP | other *** search
/ ftp.whtech.com / ftp.whtech.com.tar / ftp.whtech.com / club100 / ref / ba01d.do < prev    next >
Text File  |  2006-10-19  |  3KB  |  74 lines

  1.  
  2. Title: KEYBOARD INPUT
  3.  
  4. The function of input is to capture environmental data and digitize it.  
  5. Environmental data, also known as analog data, is data that has not been 
  6. previously digitized.  The process of digitization is one of converting analog 
  7. data into a form represented by a binary code.  A binary code is a set of 
  8. one's and zero's, purposely designed to represent analog conditions. 
  9.  
  10. The binary code most used in computing today is ANSI standard ASCII (American 
  11. National Standards Institute, American Standard Code for Information 
  12. Interchange).  ANSI ASCII was designed for our communications industry in the 
  13. late 50's.  ANSI, originally designed ASCII around 7 one's and zero's called 
  14. binary digits (BITS).  These 7 bits are used to represent the alphabet (A-Z, 
  15. a-z), base 10 characters (0-9), special characters (~!@#$"'<>,.?/, etc), and 
  16. control characters (like carrier return, line feed, clear screen, cursor 
  17. movement, etc.). 
  18.  
  19. Seven bit ASCII represents 2^7 or 128 characters.  These are called the 
  20. "standard" ASCII characters.  However, today's ASCII includes an 8th bit, 2^8 
  21. or 256 possible combinations, thus adding a second 128 combinations.  This
  22. second set is called "non-standard" ASCII, or the extended ASCII character 
  23. set.  Included in this second set are graphic, foreign, and other characters.  
  24. Not being standardized by ANSI, this second set differs in its analog 
  25. representation between computer manufacturers.
  26.  
  27. All characters may be represented in one of 5 different manners, i.e. 1) 
  28. decimal (base 10), 2) hexadecimal (base 16), 3) binary (base 2), 4) the 
  29. single keyboard character, and 5) key-combination necessary to create the 
  30. given character. 
  31.  
  32.  
  33.  
  34. INKEY$
  35.  Returns the string value of the key currently pressed, if any.  If no key is 
  36.  pressed, the function returns a null character (0 in decimal, 00 in 
  37.  hexadecimal).  In either case, BASIC doesn't wait for keyboard input, but 
  38.  goes to the next statement. 
  39.  
  40.  
  41. INPUT"prompt";variablelist
  42.  Prints prompt on the screen, then stops execution of your program until you 
  43.  enter data from the keyboard. 
  44.  
  45.  
  46. INPUT$(numericexpression)
  47.  Returns a string of numericexpression characters from the keyboard.  INPUT$ 
  48.  accepts all keys as input except SHIFT/BREAK and doesn't echo (print on the 
  49.  screen) your input. 
  50.  
  51.  
  52. KEYfunctionkeynumber,stringexpression (in BASIC only)
  53.  Defines functionkeynumber as stringexpression. 
  54.  
  55.  
  56. KEYLIST
  57.  List the current definitions for the function keys on the screen. 
  58.  
  59.  
  60. KEY(functionkeynumber)ONorOFForSTOP
  61.  Enables of disables the functionkey interrupt. 
  62.  
  63.  
  64. LINEINPUT"prompt";stringvariable
  65.  Prints prompt on the screen, then stops execution of your program until you 
  66.  enter a string from the keyboard, then assigns that string to stringvariable. 
  67.  
  68.  
  69. ONKEYGOSUBlinenumberlist
  70.  Defines interrupts for the function keys.  Upon pressing the nth function 
  71.  key, BASIC jumps to the nth line number in linenumberlist. 
  72.  
  73. <EOF>
  74.