Welcome to the NavList Message Boards.


A Community Devoted to the Preservation and Practice of Celestial Navigation and Other Methods of Traditional Wayfinding

Compose Your Message

Add Images & Files
    Re: Celestial Navigation Software released
    From: Olivier Le Diouris
    Date: 2004 Mar 22, 08:57 -0800

    You're right Michael, the "choice" command is no longer available since
    Windows 2000...
    I'll include your snippet of code on the celestjava page.
    Thanks for the hint!
    - Olivier
    Michael Dorl wrote:
    > At 08:24 AM 3/8/04 -0800, you wrote:
    >> Hi List,
    >> I'm new to this Navigation-L, and I joined it on the advice of Arthur
    >> Pearson, who has a very interesting web site about Lunar Distances.
    >> I have developed and implemented a bunch of algorithms for Celestial
    >> Navigation, in Java (that runs virtually on any platform), you can take a
    >> look at http://celestjava.sourceforge.net
    >> , it is free and open source, plus
    >> I wen through the validation smoke test this week-end, ... it seems
    >> to work
    >> fine!
    > When I try to run the celest.bat batch file, it loops trying to get
    > input from the user.
    > The problem is that my Windows 98 DOS does not have a *set /P *switch
    > nor does in understand
    > the dos *if /I* switch.
    > Below is a segment of the batch file with the *set /P* command
    > replaced with a *choice* command
    > and the */I *switch removed from the *if *commands.  I also had to
    > rem-out the line that tried to
    > reduce the string choice to one character; don't know why, maybe my
    > dos has no substring
    > capabilities. It now runs on my dos.  I guess the *choice* command
    > went away in newer dos
    > versions.
    > BTW, here's a nice link concerning user batch file input
    > http://www.robvanderwoude.com/index.html
    > It's hard to believe that the original DOS provided no way of getting
    > input from the user.  I vaguely
    > remember writing such a command many years ago.
    > echo ---------------------------------------
    > :: set /P prompts for input and sets the variable
    > :: to whatever the user types
    > set Choice=Q
    > rem set /P not functional in my dos
    > rem set /P Choice=Type the letter and press Enter:
    > choice /C:ABCDEFGHIJKLQ /N Type the letter and press enter:
    > IF ERRORLEVEL 1 SET Choice=A
    > IF ERRORLEVEL 2 SET Choice=B
    > IF ERRORLEVEL 3 SET Choice=C
    > IF ERRORLEVEL 4 SET Choice=D
    > IF ERRORLEVEL 5 SET Choice=E
    > IF ERRORLEVEL 6 SET Choice=F
    > IF ERRORLEVEL 7 SET Choice=G
    > IF ERRORLEVEL 8 SET Choice=H
    > IF ERRORLEVEL 9 SET Choice=I
    > IF ERRORLEVEL 10 SET Choice=J
    > IF ERRORLEVEL 11 SET Choice=K
    > IF ERRORLEVEL 12 SET Choice=L
    > IF ERRORLEVEL 13 SET Choice=Q
    > rem
    > :: The syntax in the next line extracts the substring
    > :: starting at 0 (the beginning) and 1 character long
    > rem if NOT '%Choice%'=='' set Choice=%Choice:~0,1%
    > echo.
    > :: /I makes the if comparison case-insensitive
    > if '%Choice%'=='A' goto ItemA
    > if '%Choice%'=='B' goto ItemB
    > if '%Choice%'=='C' goto ItemC
    > if '%Choice%'=='D' goto ItemD
    > if '%Choice%'=='E' goto ItemE
    > if '%Choice%'=='F' goto ItemF
    > if '%Choice%'=='G' goto ItemG
    > if '%Choice%'=='H' goto ItemH
    > if '%Choice%'=='I' goto ItemI
    > if '%Choice%'=='J' goto ItemJ
    > if '%Choice%'=='K' goto ItemK
    > if '%Choice%'=='L' goto ItemL
    > if '%Choice%'=='Q' goto End

    Browse Files

    Drop Files


    What is NavList?

    Join NavList

    (please, no nicknames or handles)
    Do you want to receive all group messages by email?
    Yes No

    You can also join by posting. Your first on-topic post automatically makes you a member.

    Posting Code

    Enter the email address associated with your NavList messages. Your posting code will be emailed to you immediately.

    Email Settings

    Posting Code:

    Custom Index

    Start date: (yyyymm dd)
    End date: (yyyymm dd)

    Visit this site
    Visit this site
    Visit this site
    Visit this site
    Visit this site
    Visit this site