TIP: Click on subject to list as thread! ANSI
echo: quik_bas
to: JOHN ZORTMAN
from: NIGEL TRAVES
date: 1998-03-17 12:14:00
subject: Old FAQ 2 4/5

'>>> Page 4 of QBPSEUDO.FAQ begins here.
    END SUB
    SUB ColdBoot
        DEF SEG = &hFFFF
        CALL ABSOLUTE(0)
    END SUB
*>  "Could anybody show me how `INKEY$' works please?"
    Inkey simply checks the keyboard and then returns.  If there was a
    keypress then it is returned, if not, inkey returns a NULL string.
    There are several methods of it's use.
    One is a one time scan....
    For x=1 to 1000
           ;do your stuff
           if inkey$=chr$(27) then exit for
    next x
    The other is to use it to scan the keyboard in a continuous loop
    until a key is pressed....
    Function GetKey$
           do:X$=Inkey$:loop while X$=""
           GetKey$=X$
    End Function
    Here is a similar routine to accept keys and Capitolize the first
    letter of each word....
    Function GetKeyCap$
    Toggle%=False
    Stuff$=""
           Do
                   X$=Inkey$
                   If X$=CHR$(13) then exit do   'User Pressed ENTER
                   If Toggle% then X$=Lcase$(X$) else X$=Ucase$(X$)
                   Stuff$=Stuff$+X$
                   Toggle%=( X$" ") 'Is it a Space?
           Loop
    GetKeyCap$=Stuff$
    End Function
*>  "How do you do ARCSIN and ARCCOS?"
     ARCSIN and ARCCOS are "derived" functions.  You can compute them
     using the following:
     CONST PI=3.141593
     ARCSIN(A) = ATN(A / SQR(-A * A+1))
     ARCCOS(A) = PI / 2 - ATN(A / SQR(-A * A+1))
     To convert these into full blown functions:
     Function ARCSIN# (A#)
       ARCSIN# = ATN(A# / SQR(-A# * A#+1#))
     end Function
     Function ARCCOS# (A#)
       ARCCOS# = PI / 2# - ATN(A# / SQR(-A# * A#+1#))
     end Function
*>  "How do the AND, OR, and XOR work?"
    Well, AND, OR and XOR can be mathmatical or comparative functions.
    The math functions would be (this is BIT level):
      AND           OR            XOR
    -----------   -----------   -----------
    0 AND 0 = 0   0 OR 0 = 0    0 XOR 0 = 0
    1 AND 0 = 0   1 OR 0 = 1    1 XOR 0 = 1
    0 AND 1 = 0   0 OR 1 = 1    0 XOR 1 = 1
    1 AND 1 = 1   1 OR 1 = 1    1 XOR 1 = 0
    15=1111, 7=0111, 6=0110, 2=0010, 10=1010
    so: 15 AND 7 = 7, 6 OR 2 = 6, 10 XOR 10 = 0
    The comparitive functions are like this:
    AND = "This AND That"
'>>> Page 4 of QBPSEUDO.FAQ ends here. Continued on next page.
-+- OLMS 2.53 UNREG
---
---------------
* Origin: Most Wanted BBS +44 (0)1522 887627 & 887628 * (2:2503/509)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.