Thread View: comp.sys.apple2.gno
2 messages
2 total messages
Started by scratchy.caltech.edunathan Natha...
Mon, 25 Jan 1993 06:08
Problem with input
Author: scratchy.caltech.edunathan Natha...
Date: Mon, 25 Jan 1993 06:08
Date: Mon, 25 Jan 1993 06:08
36 lines
1887 bytes
1887 bytes
I figure that this newsgroup has more techies that c.s.a2, so I'll
post it here. Using Orca/M 2.0, I'd like my login file to be able to
read in a keypress from the user, and based on that, dump the user in
a certain directory.
This is what I tried:
Echo " D - Desk.Accs"
Echo " T - Twilight"
input selection
if {selection}=="D"
prefix desk.accs
else if {selection} == "T"
prefix Twilight
endif
Written like this, it prints out the text, and then appears to wait for
a line of text. I can enter stuff, but when I press return, the computer
beeps at me. As this is the login file, open-apple-. won't work, and I
have to reboot. I tried making it "input {selection}", but that generated
an error on that line.
Can someone tell me what I've done wrong, and how to fix it, or if I
should make my login file a EXE file (right now, it's the regular EXEC SRC
file) and run it that way.
Thanks in advance.
* Nathan Mates nathan@cco.caltech.edu * MSC #850, Pasadena CA 91126
* No fancy quote, no disclaimers for irate employers, no .sig-- oops,
* Too late for that! Several Megabyte joke collector and IIGS hacker
* operating out of Caltech, the world's best University!
--
* Nathan Mates nathan@cco.caltech.edu * MSC #850, Pasadena CA 91126
* No fancy quote, no disclaimers for irate employers, no .sig-- oops,
* Too late for that! Several Megabyte joke collector and IIGS hacker
* operating out of Caltech, the world's best University!
Re: Problem with input
Author: David.Empson
Date: Wed, 27 Jan 1993 11:49
Date: Wed, 27 Jan 1993 11:49
38 lines
1812 bytes
1812 bytes
In article <1k004kINNqi3@gap.caltech.edu> scratchy.caltech.edu!nathan (Nathan Mates) writes:
> [Using ORCA/Shell 2.0, tried the following:]
>
> Echo " D - Desk.Accs"
> Echo " T - Twilight"
> input selection
> if {selection}=="D"
> prefix desk.accs
> else if {selection} == "T"
> prefix Twilight
> endif
>
> Written like this, it prints out the text, and then appears to wait for
> a line of text. I can enter stuff, but when I press return, the computer
> beeps at me. As this is the login file, open-apple-. won't work, and I
> have to reboot. I tried making it "input {selection}", but that generated
> an error on that line.
I don't know where the beep came from, or why you had to reboot.
Apple-period seems to abort an input without any problems.
The first problem in your script is the 'if': you must have a space on
either side of the == operator.
The second problem is the last line. The command used to end an if is
'end', not 'endif'.
> Can someone tell me what I've done wrong, and how to fix it, or if I
> should make my login file a EXE file (right now, it's the regular EXEC SRC
> file) and run it that way.
Nope, LOGIN must be an EXEC (SRC) file. You can get LOGIN to invoke
an EXE file if you wish.
--
David Empson
Internet: David.Empson@bbs.actrix.gen.nz EMPSON_D@kosmos.wcc.govt.nz
Snail mail: P.O. Box 27-103, Wellington, New Zealand
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads