home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.os.msdos.programmer
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!rpi!newsserver.pixel.kodak.com!laidbak!tellab5!vpnet!cgordon
- From: cgordon@vpnet.chi.il.us (gordon hlavenka)
- Subject: QB 4.5 inp() weirdness
- Message-ID: <1992Dec17.030158.8206@vpnet.chi.il.us>
- Organization: Vpnet Public Access
- Distribution: usa
- Date: Thu, 17 Dec 1992 03:01:58 GMT
- Lines: 28
-
- Here is a short code fragment:
-
- ''''' Start of code
-
- defint a-z
-
- com.port=&H3fe
-
- print "Reading 'com.port':";inp(com.port)
- print "Reading '&H3fe':";inp(&H3fe)
- print "Reading 'int(com.port)':";inp(int(com.port))
-
- system
-
- ''''' End of code
-
- Guess what: The first line gives incorrect results -- it's not
- reading port &H3fe! (I'm trying to read the RI pin; I know &H3fe is
- not the _data_ port!)
-
-
- What's going on here? What is the difference between com.port (an
- integer variable) and int(com.port)?
-
- --
- ----------------------------------------------------
- Gordon S. Hlavenka cgordon@vpnet.chi.il.us
- Vote straight ticket Procrastination party Dec. 3rd!
-