home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / os / msdos / programm / 11478 < prev    next >
Encoding:
Text File  |  1992-12-17  |  1.0 KB  |  39 lines

  1. Newsgroups: comp.os.msdos.programmer
  2. Path: sparky!uunet!zaphod.mps.ohio-state.edu!rpi!newsserver.pixel.kodak.com!laidbak!tellab5!vpnet!cgordon
  3. From: cgordon@vpnet.chi.il.us (gordon hlavenka)
  4. Subject: QB 4.5 inp() weirdness
  5. Message-ID: <1992Dec17.030158.8206@vpnet.chi.il.us>
  6. Organization: Vpnet Public Access
  7. Distribution: usa
  8. Date: Thu, 17 Dec 1992 03:01:58 GMT
  9. Lines: 28
  10.  
  11. Here is a short code fragment:
  12.  
  13. ''''' Start of code
  14.  
  15. defint a-z
  16.  
  17. com.port=&H3fe
  18.  
  19. print "Reading 'com.port':";inp(com.port)
  20. print "Reading '&H3fe':";inp(&H3fe)
  21. print "Reading 'int(com.port)':";inp(int(com.port))
  22.  
  23. system
  24.  
  25. ''''' End of code
  26.  
  27. Guess what:  The first line gives incorrect results -- it's not
  28. reading port &H3fe!  (I'm trying to read the RI pin; I know &H3fe is
  29. not the _data_ port!)
  30.  
  31.  
  32. What's going on here?  What is the difference between com.port (an
  33. integer variable) and int(com.port)?
  34.  
  35. -- 
  36. ----------------------------------------------------
  37. Gordon S. Hlavenka           cgordon@vpnet.chi.il.us
  38. Vote straight ticket Procrastination party Dec. 3rd!
  39.