home *** CD-ROM | disk | FTP | other *** search
/ Falcon 030 Power 2 / F030_POWER2.iso / ST_STE / MAGS / ICTARI03.ARJ / ictari.03 / GFA / TUTORIAL / BRANCH_3.LST < prev    next >
File List  |  1989-07-29  |  977b  |  43 lines

  1. '
  2. ' ***         Simple  Use  Of  Logic  Gate         ***
  3. ' *** And Nested (One Inside Another) IF ... ENDIF ***
  4. '
  5. CLS
  6. ' **** Enter Name & Age ****
  7. PRINT "Please identify yourself,"
  8. INPUT "Name: ",surname$
  9. INPUT "Age: ",age%
  10. '
  11. '
  12. ' **** Make Sure Name & Age Are Valid ****
  13. PRINT CHR$(10);
  14. IF (surname$="professor" OR surname$="PROFESSOR") AND age%>=19
  15.   '
  16.   '
  17.   ' **** VALID: Enter & 'Process' Number As Before ****
  18.   PRINT "AUTHORISED USER!"
  19.   INPUT "Enter A Number: ",value%
  20.   '
  21.   PRINT CHR$(10);
  22.   IF value%<0
  23.     PRINT "Number is negative"
  24.   ELSE
  25.     IF value%<10
  26.       PRINT "Number only has one digit"
  27.     ELSE
  28.       PRINT "Number has more than one digit"
  29.     ENDIF
  30.   ENDIF
  31. ELSE
  32.   '
  33.   '
  34.   ' *** INVALID: Surname And/Xor Age Are Incorrect!     ***
  35.   ' *** [Miscel Note: CHR$(10) is LF and CHR$(13) is CR ***
  36.   PRINT "NOT AUTHORISED USER,";CHR$(10);CHR$(13);"LOOK AT SOURCE MORE CAREFULLY!"
  37. ENDIF
  38. '
  39. '
  40. PRINT CHR$(7);
  41. VOID INP(2)
  42. EDIT
  43.