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.8 required=5.0 tests=BAYES_00,INVALID_DATE autolearn=no autolearn_force=no version=3.4.4 Path: utzoo!censor!geac!torsqnt!news-server.csri.toronto.edu!cs.utexas.edu!usc!zaphod.mps.ohio-state.edu!rpi!bu.edu!inmet!ryer From: ryer@inmet.inmet.com Newsgroups: comp.lang.ada Subject: Re: ada portability Message-ID: <20600072@inmet> Date: 15 Nov 90 14:10:00 GMT References: <521@wrdis03.af.mil> Nf-ID: #R:wrdis03.af.mil:521:inmet:20600072:000:1344 Nf-From: inmet.inmet.com!ryer Nov 15 09:10:00 1990 List-Id: You can expect to get out as much as you put in. For example, if you just declare variables to be of built-in types, then behavior may vary on machines/compilers with different hardware. If you declare variables with range and precision constraints to specify exactly what you need, then all compilers must give you the same behavior. If you use compiler or operating-system unique packages (e.g. DEC's package STARLET), compiler- unique pragmas, etc., then you will loose portability. If you use representation specifications to do bit twiddling, don't count on much portability. If you write your program carefully, avoiding machine dependencies, OS dependencies, and unique compiler features, you should get excellent portability. The only problem will be different bugs in different compilers, and this should not be significant. Ada *enables* you to build very portable software. Ada also enables you to write very low-level, machine dependent software. Both capabilities can be neccessary. If you have to pack some bits into a hardware defined- message packet, and use the operating system to transmit it over a 1553 bus, then you need to be able to write non-portable code, and Ada will let you. There are several guidline documents that will help you write code that is 100% portable. Hope that helps Mike Ryer Intermetrics