[futurebasic] Re: [FB] Re: Build error

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : September 2001 : Group Archive : Group : All Groups

From: Jay Reeve <jktr@...>
Date: Sun, 9 Sep 01 09:50:22 -0500
>Bernie asked:
>
>>Any ideas why I occasionally get an error message, something like the
>>following, when building an app?
>>
>>
>>Warning: Variable address rounded up to even address
>>in file frust.*:FRUST.GLBL at line 175 in AE.GLBL
>>**dim gPlayerCount%
>>
>>The built app seems to run ok though.
>
>
>Bernie,
>
>Try shuffling the order of your globals. I have found that moving any 
>BOOLEAN globals to be the last DIMmed items usually fixes the problem.
>
>Ken
>
That should do it. It's because BOOLEANs are single-byte vars. You should 
also move to the end anything dimmed as CHAR or BYTE. In general, this 
holds true in local variables as well.

I like to assing my DIMs in order of length--STR255 and other strings 
first, then DOUBLEs, then SINGLEs, then LONGs, HNDLs, and PTRs, next INT, 
WORD or SHORT, finally BOOLEAN, CHAR or BYTE. This isn't required or 
necessary, but sometimes helps the compiler to get things in the most 
efficient arrangement, and helps me to quickly see my stack usage.

 0"0
 =J= a  y
  "