comp.lang.ada
 help / color / mirror / Atom feed
From: Mike Werner <mwerner@wvu.edu>
Subject: Re: Code portability question
Date: 1999/01/24
Date: 1999-01-24T00:00:00+00:00	[thread overview]
Message-ID: <36AABFAA.2D844356@wvu.edu> (raw)
In-Reply-To: 36A9849C.A9FE01E4@rocketmail.com

Corey Ashford wrote:
> It's impossible to evaluate this without seeing the example code, and getting
> a description of the problem that was encountered.

That's what I was kind of figuring.  Unfortunately, I cannot supply the
code at this point.  It was the other guy that wrote the code.  He did
say that he would try and find it again - if he does, I'll certainly get
a copy.  All he could supply at this point was that the error concerned
initialization of floats.  He also indicated that the rewrite needed was
fairly major.  What had me so suspicious was that he was blaming his
woes on the fact that his computer had a K6 as the CPU.  His claim was
that the K6 handled floats so differently that it messed up his
program.  I didn't see how this was possible.  Or does Ada now
discriminate against the AMD?
 
> It is possible to write Ada95 code that doesn't port easily to another machine.
> A simple example would be code that relies on the byte order of the
> machine to be big endian, and the machine to which you are porting is
> little endian order.  In most cases, endianness won't affect you at all... it's
> transparent - at least until you start dealing with interfacing to hardware,
> networks, other computers, etc.  It is possible to write code which is portable
> between different machines, but the coding must be done with portability in mind.

True.  But with programs as simple as we were doing (intro to Computer
Science) it should be difficult to write code that won't transfer.  The
most complicated program I did was 230 lines.  My brother used AdaGide
on a Windoze machine and I used gnat on a Linux box as our initial
platforms - we then uploaded the source to the Unix server and
recompiled.  Neither of us ever had to do such a rewrite for our
programs.  And I'm told that the programming assignments have hardly
changed over the past few years, so his assignments should not have been
much different from what my brother and I did.
-- 
Mike Werner  KA8YSD           |  "Where do you want to go today?"
ICQ# 12934898                 |  "As far from Redmond as possible!"
'91 GS500E                    |
Morgantown WV                 |

-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GU d-@ s:+ a- C++>$ UL++ P+ L+++ E W++ N++ !o w--- O- !M V-- PS+ PE+
 Y+ R+ !tv b+++(++++) DI+ D--- G e*>++ h! r++ y++++
------END GEEK CODE BLOCK------





  parent reply	other threads:[~1999-01-24  0:00 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-01-22  0:00 Code portability question Mike Werner
1999-01-23  0:00 ` Corey Ashford
1999-01-23  0:00   ` bill_1
1999-01-24  0:00   ` Mike Werner [this message]
1999-01-24  0:00     ` Corey Ashford
1999-01-25  0:00       ` robert_dewar
1999-01-25  0:00         ` Corey Ashford
1999-01-25  0:00           ` dewar
1999-01-23  0:00 ` bill_1
1999-01-24  0:00   ` Mike Werner
1999-01-23  0:00 ` Tucker Taft
1999-01-24  0:00   ` Mike Werner
1999-01-31  0:00     ` Nick Roberts
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox