From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,14aa27db81ce3b40 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news1.google.com!npeer03.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!cyclone1.gnilink.net!gnilink.net!wn13feed!worldnet.att.net!bgtnsc04-news.ops.worldnet.att.net.POSTED!53ab2750!not-for-mail Newsgroups: comp.lang.ada From: anon@anon.org (anon) Subject: Re: How to exit an Ada program with (unix shell) error code? Reply-To: anon@anon.org (anon) References: <49ba30c9-a1e6-4346-8618-d256f87ac301@s31g2000vbp.googlegroups.com> <5d91dc13-6512-4d91-be5e-f9046917cd33@s31g2000vbp.googlegroups.com> X-Newsreader: IBM NewsReader/2 2.0 Message-ID: <58yMl.30288$941.23513@bgtnsc04-news.ops.worldnet.att.net> Date: Thu, 07 May 2009 09:48:49 GMT NNTP-Posting-Host: 12.65.24.142 X-Complaints-To: abuse@worldnet.att.net X-Trace: bgtnsc04-news.ops.worldnet.att.net 1241689729 12.65.24.142 (Thu, 07 May 2009 09:48:49 GMT) NNTP-Posting-Date: Thu, 07 May 2009 09:48:49 GMT Organization: AT&T Worldnet Xref: g2news2.google.com comp.lang.ada:5723 Date: 2009-05-07T09:48:49+00:00 List-Id: 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 writes: >On May 4, 2:42=A0pm, Robert A Duff wrote: >> reinkor 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