comp.lang.ada
 help / color / mirror / Atom feed
  • * Re: I have a question...
           [not found] <1994Oct07.034523.161470@zeus.aix.calpoly.edu>
           [not found] ` <SPIEGEL.94Oct10115716@moskau.bruessel.informatik.uni-stuttgart.de>
    @ 1994-10-13 17:13 ` James A. Krzyzanowski
      1994-10-13 15:29   ` David Emery
      1 sibling, 1 reply; 12+ messages in thread
    From: James A. Krzyzanowski @ 1994-10-13 17:13 UTC (permalink / raw)
    
    
    Jana Wonder Twin #1 (kamundse@harp.aix.calpoly.edu) wrote:
    : I am working on a program and it asks the user to type in the name of
    : the file from which it should take data.
    
    : I would like the user to be able to specify (this is in UNIX) a file
    : that does not have to be within the directory from which they are
    : executing the program.
    
    : But I cannot figure out how I might (or even if I can) do this.  I think
    : if the user types in ~survey/data or /survey/data that it will not
    : recognixe a ~ or / as a UNIX command but as characters in the file name.
    
    It may depend upon which Ada compiler you are using.  We have HP 9000
    workstations and are running HP/Alsys Ada.  I have a program already that asks
    the user to enter a filename and then do some processing on it.  I tried using
    "~" and "/" in the filename and it worked like a champ.
    
    If you don't have Alsys Ada, then the compiler may also provide the capability
    to execute UNIX commands within your Ada code.  If this is the case, you could
    use UNIX to "cat" the file or whatever.
    -- 
    ---------------------------------------------------------------------------
    James A. Krzyzanowski - Senior Software Engineer - AFATDS
    Magnavox Electronic Systems Company * Fort Wayne, IN 46808 * (219) 429-6446
    E-Mail : jak@pseserv2.magec.com
    
    
    
    ^ permalink raw reply	[flat|nested] 12+ messages in thread
  • * Re: Ada programs in a UNIX environment (was Re: I have a question...)
    @ 1994-10-20 11:01 The Trooper
      0 siblings, 0 replies; 12+ messages in thread
    From: The Trooper @ 1994-10-20 11:01 UTC (permalink / raw)
    
    
    spiegel@bruessel.informatik.uni-stuttgart.de (Andre Spiegel) writes:
    [snip]
    > And what if the mechanism you have re-implemented gets changed (for
    > example, a new generation of shells comes up), or your program is to
    > be ported to, say, a non-UNIX environment, where there are completely
    > different conventions and facilities?
    >
     How's about either
    	system ("echo $HOME/foo");
     or
    	system ("csh -c echo ~/bar");
     ?
    
     I'm sure you can figure out how to call 'system' from Ada ...
    
    > Andre Spiegel
    -- 
    #  Bill Crawford, BSc (Hons) Comp Sci Year 4 : w.j.m.crawford@bton.ac.uk  #
    # Any views wot I express is not necessarily those of Brighton University #
    
    
    
    ^ permalink raw reply	[flat|nested] 12+ messages in thread

    end of thread, other threads:[~1994-10-20 11:01 UTC | newest]
    
    Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
    -- links below jump to the message on this page --
         [not found] <1994Oct07.034523.161470@zeus.aix.calpoly.edu>
         [not found] ` <SPIEGEL.94Oct10115716@moskau.bruessel.informatik.uni-stuttgart.de>
    1994-10-12 17:33   ` I have a question David Emery
    1994-10-14  1:21     ` Keith Thompson @pulsar
    1994-10-14 16:46       ` Andre Spiegel
    1994-10-14 14:16         ` David Emery
    1994-10-14 21:32           ` Norman H. Cohen
    1994-10-17 10:34             ` Ada programs in a UNIX environment (was Re: I have a question...) Andre Spiegel
    1994-10-15 11:28       ` I have a question Keith Thompson @pulsar
    1994-10-14  7:38     ` Henri Altarac
    1994-10-14 21:25     ` Kevin Cline
    1994-10-13 17:13 ` James A. Krzyzanowski
    1994-10-13 15:29   ` David Emery
    1994-10-20 11:01 Ada programs in a UNIX environment (was Re: I have a question...) The Trooper
    

    This is a public inbox, see mirroring instructions
    for how to clone and mirror all data and code used for this inbox