comp.lang.ada
 help / color / mirror / Atom feed
* Package
@ 1997-02-24  0:00 R.J. Willacy
  0 siblings, 0 replies; 2+ messages in thread
From: R.J. Willacy @ 1997-02-24  0:00 UTC (permalink / raw)



has anyone got an ada package that allows you to implement a directed
graph using linked lists for my applied maths class.

cheers

rob




^ permalink raw reply	[flat|nested] 2+ messages in thread

* package
@ 1997-08-13  0:00 Eric James DeArment
  0 siblings, 0 replies; 2+ messages in thread
From: Eric James DeArment @ 1997-08-13  0:00 UTC (permalink / raw)



I'm still new to Ada and I need to know if the package below is written
correctly.  It's designed to let the user access Unix system-level
functions like Lynx, Telnet, Sendmail and logout.  Here it is:

with interfaces.c; use interfaces.c;
with ada.text_io; use ada.text_io;
package body sysfunct is

	function system(Command : in char_array) return integer;
	pragma Import (C, system, system);

procedure www is
begin
	system(lynx);
end www;

procedure telnetg is
begin	
	system(telnet garcia.efn.org);
end telnetg;

procedure telnetc is
begin
	system(telnet caritas.efn.org);
end telnetc;

procedure exit is
begin
	system(logout);
end exit;

procedure mail is
begin
	text_io.put("To send your message when you're done, press");
	text_io.put(" <Enter> and type a period on the line just ");
	text_io.put("below the last line of your message body.");
	system(sendmail ejd@efn.org);
  end mail;
end sysfunct;

I still have plenty to learn about Ada, so I suspect that this package is
filled to the brim with bugs.  Basically, I'm just requesting that someone
maybe points out the bugs, and maybe gives me some solutions.  

						Thanks in advance,
							Eric

Note: please send your reply(s) to my address rather than posting them to
the newsgroup.





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1997-08-13  0:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-08-13  0:00 package Eric James DeArment
  -- strict thread matches above, loose matches on Subject: below --
1997-02-24  0:00 Package R.J. Willacy

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