* Using Text_Io.Open
@ 1997-11-10 0:00 AA HOLMES
1997-11-10 0:00 ` David Weller
1997-11-10 0:00 ` Tarjei T. Jensen
0 siblings, 2 replies; 3+ messages in thread
From: AA HOLMES @ 1997-11-10 0:00 UTC (permalink / raw)
Hello. I'm a student studying Ada in a Unix enviroment.
When you open files using Text_Io.Open command you can specify a path name
for the file. Unfortunatly I want to use the '~' to specify the directory
/home/(user)
user been the users login name. So far I have to recompile the source
everytime Someone asks for a copy of my program.
So for example if someone with login name psdrayto asked for a copy, I
would have to change the file name to /home/psdrayto/config and then
recompile. Is there a way to use system Variables or shortcuts in Ada ?
Aidan.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Using Text_Io.Open
1997-11-10 0:00 Using Text_Io.Open AA HOLMES
1997-11-10 0:00 ` David Weller
@ 1997-11-10 0:00 ` Tarjei T. Jensen
1 sibling, 0 replies; 3+ messages in thread
From: Tarjei T. Jensen @ 1997-11-10 0:00 UTC (permalink / raw)
AA HOLMES wrote:
>
> Hello. I'm a student studying Ada in a Unix enviroment.
> When you open files using Text_Io.Open command you can specify a path name
> for the file. Unfortunatly I want to use the '~' to specify the directory
> /home/(user)
> user been the users login name. So far I have to recompile the source
> everytime Someone asks for a copy of my program.
> So for example if someone with login name psdrayto asked for a copy, I
> would have to change the file name to /home/psdrayto/config and then
> recompile. Is there a way to use system Variables or shortcuts in Ada ?
>
I belive that with GNAT command line stuff has an extension that allows
you to have a look at environment variables. I belive that ACT has some
online documentation at http://www.gnat.com.
If I'm wrong about the documentation the compiler and some documentation
is available from ftp://cs.nyu.edu/pub/gnat.
Greetings,
--
// Tarjei T. Jensen
// tarjei@online.no || voice +47 51 62 85 58
// Support you local rescue centre: GET LOST!
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Using Text_Io.Open
1997-11-10 0:00 Using Text_Io.Open AA HOLMES
@ 1997-11-10 0:00 ` David Weller
1997-11-10 0:00 ` Tarjei T. Jensen
1 sibling, 0 replies; 3+ messages in thread
From: David Weller @ 1997-11-10 0:00 UTC (permalink / raw)
In article <Pine.GSO.3.95.971110170857.578D-100000@dcsun4.comp.brad.ac.uk>,
AA HOLMES <aaholmes@comp.brad.ac.uk> wrote:
>Hello. I'm a student studying Ada in a Unix enviroment.
>When you open files using Text_Io.Open command you can specify a path name
>for the file. Unfortunatly I want to use the '~' to specify the directory
>/home/(user)
>user been the users login name. So far I have to recompile the source
>everytime Someone asks for a copy of my program.
Remember that things like ~ and $HOME are unique to the shells you're
using. These features are non-portable to OS platforms like
Microsoft. You should look at the vendor-supplied libraries. If
you're using GNAT, you can use the routine supplied in GNAT.IO_Aux.
Although I hasten to add that you may still have to explicitly expand
the shell symbol.
Good luck!
--
****** NEW!! DoD Ada Hotline Number: 1-800-PARIAH ******
I refuse to let spammers control my e-mail address. You don't have to remove
anything to send me e-mail. Do what I do: Save your "spam", print it
out, and mail it once a month to your Congressman. TAKE BACK THE INTERNET!
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~1997-11-10 0:00 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-11-10 0:00 Using Text_Io.Open AA HOLMES
1997-11-10 0:00 ` David Weller
1997-11-10 0:00 ` Tarjei T. Jensen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox