Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Unnamed structs in C--bad?

Author: Tom Kerrigan

Date: 06:08:29 12/04/99

Go up one level in this thread


On December 02, 1999 at 20:36:17, Dann Corbit wrote:

>It is terribly important to consider that an integer comparison won't work
>either when the above test does not.  Again the reason is alignment.  A compiler
>can certainly do this:

The example you give may fail, but for my union (an int = 4 chars) comparing
ints should be just as effective as comparing the individual characters...

(Assuming ints are 4 bytes long.)

-Tom



This page took 0 seconds to execute

Last modified: Thu, 15 Apr 21 08:11:13 -0700

Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.