[svlug] Re: Embedded C++
Karl Larsen
k5di at zianet.com
Wed Sep 17 11:00:03 PDT 2003
On Wed, 17 Sep 2003, Rick Kwan wrote:
> David Christensen wrote:
>
> >Rick Kwan wrote:
> >
> >>> I had a discussion with an embedded systems developer about
> >>> strengths and weaknesses of C, C++, Ada, and Java in an
> >>> embedded environment.
>
>
> I also hear that many in the Ada community consider going from Ada
> to C++ a dangerous move, both from a safety and an engineering
> productivity perspective. The poster child for this is:
> if (a = b) c = d;
> which is legal C/C++ but ought to be
This was taught to me in basic C programing. NEVER enclose an
equal sign!!! You do it this way:
if
{
a=b;
then a*c = d;
else d = 1;
}
This I made long so you can see whats happening.
> if (a == b) c = d;
> and is written in Ada as
> if a = b then c := d end if;
I do not understand ada but that looks wrong....
>
> A few years ago, DoD dropped the requirement that embedded software
> be written in Ada. Prime contractors are now expected to apply
> their professional judgement. Many are moving from Ada to C++ or
> Java (whenever the real-time core is firmed up).
>
> Just to put this in perspective, the Boeing 777 has 4 million lines
> of software and uses 1280 embedded processors. (Source:
> http://www.aiaa.org/jacic) I gathered from somewhere (that now
> slips my mind) that all of this is written in Ada.
>
> --Rick Kwan
>
>
>
> _______________________________________________
> svlug mailing list
> svlug at lists.svlug.org
> http://lists.svlug.org/lists/listinfo/svlug
>
--
- Karl Larsen k5di Las Cruces,NM Az ScQRPions -
More information about the svlug
mailing list