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=1.3 required=5.0 tests=BAYES_00,INVALID_MSGID, MSGID_RANDY autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,f495c7652c09dd8c X-Google-Attributes: gid103376,public From: jrcarter001@my-dejanews.com Subject: Re: Does this model work ? Date: 1999/05/17 Message-ID: <7hpbco$hsi$1@nnrp1.deja.com>#1/1 X-Deja-AN: 478762065 References: <373e38e2.31311363@news2.ibm.net> <7hhj6q$cjn$1@nnrp1.deja.com> <7hmda1$khp$1@nnrp1.deja.com> X-Http-Proxy: 1.0 x31.deja.com:80 (Squid/1.1.22) for client 206.239.237.114 Organization: Deja.com - Share what you know. Learn what you don't. X-Article-Creation-Date: Mon May 17 15:08:11 1999 GMT Newsgroups: comp.lang.ada X-Http-User-Agent: Mozilla/4.51 [en] (Win95; U) Date: 1999-05-17T00:00:00+00:00 List-Id: In article <7hmda1$khp$1@nnrp1.deja.com>, Robert Dewar wrote: > However, Ada is no panacea. Over and over again, we run into > cases where incompetence or deliberate (in-retrospect-poort) > decisions have lead to highly non-portable code, and this can > often be eacerbated by management or incompetent Ada vendor > sales people who have sold the idea that Ada guarantees > 100% portability. That's wrong, it does not. > I'd like to make a plug for Ada over Ada 83 for portability. Ada 83 could be used to produce highly portable programs, but in some arenas led to lack of portability. As an example, I recently got to port some Ada-83 real-time code from a little-endian processor to a big-endian processor. In the process, I could convert it from Ada 83 to Ada. The code has timing requirements, and the Ada-83 compiler had problems with low-level bit manipulation. Converting to Boolean arrays was too slow, so C functions were used for bit manipulation. Much of this C code was endian dependent. This was a portability problem that could have been avoided. More significantly, the Ada tasking implementation did not allow them to use tasks and meet their timing requirements, leading to OS calls for task-related operations. This was not a portability problem, since both versions would use the same RTOS, but could become one. Ada now has low-level bit-manipulation capabilities through modular types and package Interfaces, and protected objects have eliminated much of the overhead that made Ada tasking too slow in Ada 83. I was able to create a completely portable version of the code that ran on little-endian and big-endian machines with different OSes, met the timing requirements, and gave identical results. Timing seems to be becoming a moot point. This code has since been used successfully on a 133 Mhz Pentium laptop running Windows 95 with a custom PCMCIA card. This duplicates the functionality of the custom hardware that the code originally ran on, except the custom hardware could provide 4 communications channels, and the PCMCIA card only provides 2. This laptop/PCMCIA combination promises to be a popular product for our company. --== Sent via Deja.com http://www.deja.com/ ==-- ---Share what you know. Learn what you don't.---