home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!noc.near.net!hri.com!spool.mu.edu!darwin.sura.net!dtix!mimsy!nmrdc1!frmug!lill!vanney.raphael
- From: vanney.raphael@lill.frmug.fr.mugnet.org (Vanney Raphael)
- Newsgroups: comp.lang.pascal
- Subject: A COUPLE QUESTIONS
- Message-ID: <931.6.uupcb@lill.frmug.fr.mugnet.org>
- Date: 18 Dec 92 01:21:00 GMT
- Reply-To: vanney.raphael@lill.frmug.fr.mugnet.org (Vanney Raphael)
- Organization: Li'LL BBS - Paris, France
- Lines: 59
-
- DSR}From: dementia@cheshire.oxy.edu (Daniel Steven Reinker)
- DSR}Newsgroups: comp.lang.pascal
- DSR}Subject: A couple questions
- DSR}Date: 2 Dec 92 06:40:10 GMT
- DSR}Organization: Occidental College, Los Angeles, CA 90041 USA.
-
- Hi "rookie" :-)))) !
-
- DSR}I have a few questions about turbo pascal 6.0...obviously I am a
- newbie
- DSR}programmer, so please bear with me.
-
- DSR}1) Is there any way to allow the program to read one string (one
- word),
- DSR}then 'sense' a space, and then start reading the next string?
-
- If it is definitely a 'space' character you have to puut there, I'm
- afraid
- you're going to have to parse the input string -which is quite easy with
- the "Pos" function.
-
- DSR}2) Is there a way to have an 'if' have an 'or' in it? For instance,
- say
- DSR}I want it to do the same procedure 'proc' if a string 'word' = hello
- DSR}or = 'bye'. How do I program this in? (I am writing an adventure
- program,
- DSR}and I want it to accept 'get' and 'take' as synonyms.)
-
- Just try
-
- { 'better uppercase your Word before }
- If (Word='HELLO') Or (Word='BYE') Then Proc ;
-
- DSR}3) Is it possible to make a program with turbo pascal, and make it
- DSR}self-running, that is, you don't have to enter the program through
- TP,
- DSR}you can enter it straight from the program?
-
- TPC /m progname
-
- certainly works fine from the command line ; if you a an IDE user,
- select Compile/Destination/File (Or Disk, I can't remember, but not
- "memory").
-
- DSR}Thanks.
- DSR}Hiz Lord Dementia
- DSR}--
- DSR}"You can't help that. We're all mad here."-The cheshire cat, Alice
- in WL
-
- DSR}"A mass hysteria/a megalomania/reveal Dementia/reveal"-Metallica
-
-
- DSR}--- GEcho 1.00
- DSR} * Origin: Li'LL BBS - Paris France - (33-1) 43.07.40.97 (2:320/7)
- * OLX 2.1 TD * Ain't got anything serious to write here ?
- --- FMail 0.92
- * Origin: ICEBERG - La Garenne * FRANCE * Tel:(33)-1-47699261 (2:320/1)
-
-