From: anon@anon.org (anon)
Subject: Re: How to exit an Ada program with (unix shell) error code?
Date: Thu, 07 May 2009 09:48:49 GMT
Date: 2009-05-07T09:48:49+00:00 [thread overview]
Message-ID: <58yMl.30288$941.23513@bgtnsc04-news.ops.worldnet.att.net> (raw)
In-Reply-To: 5d91dc13-6512-4d91-be5e-f9046917cd33@s31g2000vbp.googlegroups.com
The answer is that No Language will ever standardize the OS routines or
hardware IO interface.
This is just one of many reasons that could easily fill a book on why!
This is because no language can insure that all of the OS routines will exist
in furture version of an OS. Or if the hardware will be supported in that OS.
Except for the keyboard, video, and the 3 kinds of file types. So, GNAT
packages such as GNAT.Sockets package which should be moved to
System.Sockets will never be standardize because how long before computer
industry replaces the "Sockets" with another better I/O subsystem.
Just like, when industry mainly replaced both the "Serial" and "Parallel"
ports with the more advanced serial port called "USB". Also, they mainly
replaced the bus mouse and ps keyboards with an USB version. Now to the
system programmer it just add an extra I/O layer they must deal with. But
to the normal programmer that is no change on how to access the keyboard
or mouse, it all transpaent.
Another reason is what type of standard.
There are a few system programmers that would like to see that all
devices be declare as a stream devices. Could you see a programmer
using System.Device_IO package built using Ada.Streams and opening a
camera device or reading a steam camera device.
package Camera_IO is new Ada.Device_IO (Camera_type);
...
-- Attach (Open) the first camera using USB port to Cam_1
Camera_IO.open ( Cam_1, In_File, "usb://camera" ) ;
or download a picture by using the following routine
Cam_1 : Camera_Type ;
Pic_1 : Camera_JPG ;
...
Camera_JPG'Read ( Cam_1, Pic_1 ) ;
In <5d91dc13-6512-4d91-be5e-f9046917cd33@s31g2000vbp.googlegroups.com>, Martin <martin.dowie@btopenworld.com> writes:
>On May 4, 2:42=A0pm, Robert A Duff <bobd...@shell01.TheWorld.com> wrote:
>> reinkor <rein...@gmail.com> writes:
>> > Thanks, but how I terminate the program in a "natural" way
>> > (without using goto or "raise exception") ?
>>
>> You can call OS_Exit or OS_Abort in GNAT.OS_Lib. =A0Look at the comments
>> to see misc subtle issues.
>
>But that's not a "natural" way, as you may not be using GNAT.
>
>Perfectly portable, if you don't mind writing the packages yourself if
>you don't have access to the GNAT packages but not 'vanilla Ada'.
>
>Is there any Ada1Z work on providing common OS services?
>
>Cheers
>-- Martin
next prev parent reply other threads:[~2009-05-07 9:48 UTC|newest]
Thread overview: 45+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-04 9:08 How to exit an Ada program with (unix shell) error code? reinkor
2009-05-04 9:17 ` Samuel Tardieu
2009-05-04 9:26 ` reinkor
2009-05-04 9:31 ` Ludovic Brenta
2009-05-04 9:47 ` reinkor
2009-05-04 9:54 ` Martin
2009-05-04 11:38 ` sjw
2009-05-04 10:07 ` stefan-lucks
2009-05-04 13:42 ` Robert A Duff
2009-05-04 16:19 ` Martin
2009-05-07 9:48 ` anon [this message]
2009-05-04 16:09 ` anon
2009-05-05 10:49 ` Rob Norris
2009-05-05 11:15 ` Georg Bauhaus
2009-05-05 11:43 ` Martin
2009-05-05 14:57 ` Adam Beneschan
2009-05-05 15:34 ` Jean-Pierre Rosen
2009-05-06 15:28 ` Adam Beneschan
2009-05-06 22:10 ` Randy Brukardt
2009-05-07 9:08 ` anon
2009-05-07 10:01 ` Georg Bauhaus
2009-05-07 11:22 ` anon
2009-05-07 12:08 ` Martin
2009-05-07 13:34 ` Georg Bauhaus
2009-05-07 16:26 ` Adam Beneschan
2009-05-08 10:17 ` anon
2009-05-12 22:55 ` Adam Beneschan
2009-05-14 2:55 ` anon
2009-05-14 8:04 ` Martin
2009-05-14 8:39 ` Martin
2009-05-14 8:45 ` Martin
2009-05-14 9:34 ` Ludovic Brenta
2009-05-14 10:05 ` Martin
2009-05-14 12:38 ` Georg Bauhaus
2009-05-14 15:34 ` Adam Beneschan
2009-05-15 10:20 ` anon
2009-05-15 11:19 ` Martin
2009-05-05 20:48 ` anon
2009-05-05 21:01 ` Adam Beneschan
2009-05-06 11:30 ` Hibou57 (Yannick Duchêne)
2009-05-05 20:31 ` anon
2009-05-05 21:27 ` Martin
2009-05-06 8:41 ` anon
2009-05-06 9:14 ` Martin
2009-05-06 11:41 ` Georg Bauhaus
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox