🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.apple2.gno
Article #506

Re: Problem with input

#506
From: David.Empson
Date: Wed, 27 Jan 1993 11:49
38 lines
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
Technical Details
Message-ID: <1993Jan27.114928.3082@actrix.gen.nz>
Path: arc1-ca.pugleaf.net!sparky!uunet!comp.vuw.ac.nz!actrix!David.Empson
References: <1k004kINNqi3@gap.caltech.edu>

Show Full Headers
Complete Article Headers
Newsgroups: comp.sys.apple2.gno
Path: arc1-ca.pugleaf.net!sparky!uunet!comp.vuw.ac.nz!actrix!David.Empson
From: David.Empson@bbs.actrix.gen.nz
Subject: Re: Problem with input
Organization: Actrix Information Exchange
Date: Wed, 27 Jan 1993 11:49:28 GMT
Message-ID: <1993Jan27.114928.3082@actrix.gen.nz>
References: <1k004kINNqi3@gap.caltech.edu>
Sender: David.Empson@actrix.gen.nz (David Empson)
Lines: 38