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.2 required=5.0 tests=BAYES_00,INVALID_MSGID, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,577c9f9c0cdd76d X-Google-Attributes: gid103376,public From: Marin Condic Subject: Re: Confusing language, was Re: Help help.. please.i am totaly new in ada programing Date: 1999/11/11 Message-ID: <382AD967.550A03CF@pwfl.com>#1/1 X-Deja-AN: 547344220 Content-Transfer-Encoding: 7bit Sender: condicma@bogon.pwfl.com References: <7vqgs2$lcc$1@nnrp1.deja.com> <38233108.F3540F0@ebox.tninet.se> <806716$i6c2@ftp.kvaerner.com> <807109$8m0$1@nnrp1.deja.com> <38270DC7.86553BB1@pwfl.com> <38285C60.B3E2D2BC@pwfl.com> <809u91$3ik$1@nntp1.atl.mindspring.net> <80djd2$48o$1@nnrp1.deja.com> X-Accept-Language: en Content-Type: text/plain; charset=us-ascii Organization: Pratt & Whitney Mime-Version: 1.0 Reply-To: condicma@pwflcom Newsgroups: comp.lang.ada Date: 1999-11-11T00:00:00+00:00 List-Id: Robert Dewar wrote: > Note as a contrast Ada's view of how to store dates, which is > completely hidden from the programmer. If you instantiate > sequential I/O for a type with Calendar.Time in it, you get > a tape full of highly implementation dependent data, something > that one avoids like the plague in the COBOL world. The COBOL model is superior in many ways to the Ada model in this area. Wherever you have a significant database or important files of some sort, you generally have no idea who or how will be using that data across its useful life. When I was working for the City of Chicago, we had traffic accident data on tape going back 15 years - still in the original flat-file format. There had been dozens of technological changes since the first data was recorded. Many systems were built using a variety of tools which used the data as input. Had there not been some kind of common representation (character, in this case) for dates and numbers, etc., the problems associated with working with the data could have been immense. When I was developing some applications here at Pratt that would be storing important data with a long life, I built myself a package of date tools that would take objects of Ada.Calendar.Time and convert them to a variety of useful string formats. Since I figured I'd likely be around at Pratt when Y2K hit (as it turns out, not) I didn't want to be stuck fixing the problem, so externally, I stored all data as: YYYYMMDD. The conversions coming in or going out were pretty trivial and its worked fine - my systems being one of the few to pass the Y2K audit without modification. Now if there were some sort of Industry Standard for storing dates/times externally, it might be valuable to extend Ada.Calendar with some conversions to do this. After all, most external character storage of numeric values kind of have an Industry Standard (or at least lowest common denominator) and Ada.Text_IO is capable of dealing with that quite well. MDC -- Marin David Condic If you hurry you can, for a short time only, still find me at: Real Time & Embedded Systems, Propulsion Systems Analysis United Technologies, Pratt & Whitney, Large Military Engines M/S 731-95, P.O.B. 109600, West Palm Beach, FL, 33410-9600 ***To reply, remove "bogon" from the domain name.*** Visit my web page at: http://www.mcondic.com/