home *** CD-ROM | disk | FTP | other *** search
/ AMIGA PD 1 / AMIGA-PD-1.iso / Programme_zum_Heft / Programmieren / Kurztests / ACE / Prgs / learning / hellas.lha / Hellas / hellas.b < prev    next >
Text File  |  1995-01-26  |  2KB  |  73 lines

  1. '    H E L L A S . B
  2. '
  3. '    Version   : 1995.01.05
  4. '    Author    : Harald Arnesen <haralda@oslonett.no>
  5. '
  6. '    This program is public domain. The included font 'CGTriumvirateGR'
  7. '    is NOT public domain. The bitmap was made from the CompuGraphic font
  8. '    in the Hellas_WB package found on Aminet, and the READ.ME file says
  9. '    the package is freeware.
  10. '
  11. '    BASIC compiler used: ACE 2.3 (thanks, DB!).
  12. '
  13. '    This program helps you learn the Greek alphabet.
  14. '    It displays a random lower-case letter, and you are asked to write
  15. '    the name of the letter. If you guess wrong, the upper-case letter
  16. '    will be displayed. If you enter a blank line, the program ends.
  17. '
  18. '    Tested on an A3000 with KS/WB 3.1 and an A600 with KS 2.04/WB 2.1.
  19. '
  20. '    See you all in beautiful Greece this summer!
  21.  
  22. DEFINT a-z
  23. DIM uppercase$ (24), lowercase$ (24), lettername$ (24)
  24.  
  25. 'According to my Linguaphone course, these are the letter names.
  26. 'DATA alpha, vita, gamma, delta, epsilon, zeta, eta, theta, yiota, kappa, lambda
  27. 'DATA mi, ni, ksi, omikron, pi, ro, sigma, sigma, taf, ipsilon, fi, hi, psi, omega
  28.  
  29. 'According to DB's physics book, these are correct
  30. DATA alpha, beta, gamma, delta, epsilon, zeta, eta, theta, iota, kappa, lambda
  31. DATA mu, nu, xi, omicron, pi, rho, sigma, sigma, tau, upsilon, phi, chi, psi, omega
  32.  
  33. RESTORE
  34. letter = 193
  35. FOR i=0 TO 24
  36.     uppercase$ (i) = CHR$ (letter)
  37.     lowercase$ (i) = CHR$ (letter + 32)
  38.     READ lettername$ (i)
  39.     ++ letter
  40. NEXT
  41.  
  42. WINDOW 1, "Learn the Greek alphabet", (100,40)-(480,160),0
  43. RANDOMIZE TIMER
  44. i=RND    'First pseudorandom number is always the 0.16894789. Bug in ACE? (HA)
  45.     'Yes, it's on my list to fix. Only matters if the first random number
  46.     'is important to your program. Your workaround is fine though. (DB)
  47. WHILE 1
  48.     showupper = 0
  49.     i = RND * 24
  50.     REPEAT
  51.         CLS
  52.         FONT "CGTriumvirateGr", 24
  53.         LOCATE 2, 6
  54.         PRINT lowercase$ (i)
  55.         IF showupper THEN
  56.             LOCATE 2, 8
  57.             IF i = 17 THEN    'There are two small sigmas
  58.                 PRINT uppercase$ (18)
  59.             ELSE
  60.                 PRINT uppercase$ (i);
  61.             END IF
  62.         END IF
  63.         FONT "Courier", 24    'INPUT doesn't like proportional fonts
  64.         LOCATE 2, 10
  65.         INPUT, guess$
  66.         IF guess$ = "" THEN
  67.             WINDOW CLOSE 1
  68.             STOP
  69.         END IF
  70.         showupper = 1
  71.     UNTIL guess$ = lettername$ (i)
  72. WEND
  73.