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!attcan!uunet!samsung!zaphod.mps.ohio-state.edu!ncar!boulder!alumni.colorado.edu!jpren From: jpren@alumni.colorado.edu (John Prentice) Newsgroups: comp.lang.ada Subject: Re: Keyboard input Message-ID: <26908@boulder.Colorado.EDU> Date: 25 Sep 90 18:13:07 GMT References: <39@screamer.csee.usf.edu> <920032@hpclapd.HP.COM> Sender: news@boulder.Colorado.EDU Organization: University of Colorado, Boulder List-Id: >I think it's pretty simple: If you have to resort to using C instead of >Ada then it's not Ada is it? What so hard to understand about that? And >what happens when you port this to a system that doesn't have C huh? I >mean, what if the poor guy doesn't have anything but Ada? > If the system has only Ada, then in all likelyhood, all OS functions will be accessible via Ada subprogram/task entry calls, and there will be no need for C routines. If the operating system is written in Ada and designed to support Ada, then C code written for such a system might well have to resort to calling various Ada routines. > >Yeah it's not standard, it's not contained in TEXT_IO and all that. Also, >I've probably done more pragma INTERFACE'ing than you have. But that don't >make it portable. At best it opens up opportunties for portablity >problems. > As long as there are different HW architecures and different OSs, then complete portability is a myth. C code is often highly portable accross similar architures using Unix, but this portability is not an intrinsic property of C; it is a funtion of the similar HW and common OS. In general, the goal of writing "portable" code is to minimize and localize non-portable code. In terms of intrinsic language properties, Ada is no worse off than C (perhaps better). The Ada package provides a very nice mechanism for isolating low-level dependencies behind a common interface. Also, Ada's tasking facilities (for example) can support multi-processing or multi-programming without a need to make calls to the underlying OS, again enhancing portability.