home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / lang / pascal / 7589 < prev    next >
Encoding:
Internet Message Format  |  1992-12-21  |  2.3 KB

  1. Path: sparky!uunet!noc.near.net!hri.com!spool.mu.edu!darwin.sura.net!dtix!mimsy!nmrdc1!frmug!lill!vanney.raphael
  2. From: vanney.raphael@lill.frmug.fr.mugnet.org (Vanney Raphael)
  3. Newsgroups: comp.lang.pascal
  4. Subject: A COUPLE QUESTIONS
  5. Message-ID: <931.6.uupcb@lill.frmug.fr.mugnet.org>
  6. Date: 18 Dec 92 01:21:00 GMT
  7. Reply-To: vanney.raphael@lill.frmug.fr.mugnet.org (Vanney Raphael)
  8. Organization: Li'LL BBS - Paris, France
  9. Lines: 59
  10.  
  11. DSR}From: dementia@cheshire.oxy.edu (Daniel Steven Reinker)
  12. DSR}Newsgroups: comp.lang.pascal
  13. DSR}Subject: A couple questions
  14. DSR}Date: 2 Dec 92 06:40:10 GMT
  15. DSR}Organization: Occidental College, Los Angeles, CA 90041 USA.
  16.  
  17. Hi "rookie" :-)))) !
  18.  
  19. DSR}I have a few questions about turbo pascal 6.0...obviously I am a
  20. newbie
  21. DSR}programmer, so please bear with me.
  22.  
  23. DSR}1) Is there any way to allow the program to read one string (one
  24. word),
  25. DSR}then 'sense' a space, and then start reading the next string?
  26.  
  27. If it is definitely a 'space' character you have to puut there, I'm
  28. afraid
  29. you're going to have to parse the input string -which is quite easy with
  30. the "Pos" function.
  31.  
  32. DSR}2) Is there a way to have an 'if' have an 'or' in it? For instance,
  33. say
  34. DSR}I want it to do the same procedure 'proc' if a string 'word' = hello
  35. DSR}or = 'bye'. How do I program this in? (I am writing an adventure
  36. program,
  37. DSR}and I want it to accept 'get' and 'take' as synonyms.)
  38.  
  39. Just try
  40.  
  41.      { 'better uppercase your Word before }
  42.      If (Word='HELLO') Or (Word='BYE') Then Proc ;
  43.  
  44. DSR}3) Is it possible to make a program with turbo pascal, and make it
  45. DSR}self-running, that is, you don't have to enter the program through
  46. TP,
  47. DSR}you can enter it straight from the program?
  48.  
  49. TPC /m progname
  50.  
  51.      certainly works fine from the command line ; if you a an IDE user,
  52.      select Compile/Destination/File (Or Disk, I can't remember, but not
  53.      "memory").
  54.  
  55. DSR}Thanks.
  56. DSR}Hiz Lord Dementia
  57. DSR}--
  58. DSR}"You can't help that. We're all mad here."-The cheshire cat, Alice
  59. in WL
  60.  
  61. DSR}"A mass hysteria/a megalomania/reveal Dementia/reveal"-Metallica
  62.  
  63.  
  64. DSR}--- GEcho 1.00
  65. DSR} * Origin: Li'LL BBS - Paris France - (33-1) 43.07.40.97 (2:320/7)
  66.  * OLX 2.1 TD * Ain't got anything serious to write here ?
  67. --- FMail 0.92
  68.  * Origin: ICEBERG - La Garenne * FRANCE * Tel:(33)-1-47699261 (2:320/1)
  69.                                                     
  70.