Actually, the INT wouldn't be needed.

I'm guessing that the +1 was to make the 79 even
Anything*2 will be even

So and even# (80) - and even# (*2) / 2 will always be even , no int needed.

-----Original Message-----
From: u2-users-boun...@listserver.u2ug.org 
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Charlie Noah
Sent: Monday, November 14, 2011 2:41 PM
To: U2 Users List
Subject: Re: [U2] Simplify, or why mathematicians make better programmers

Actually, it needs more than simplification - the result it returns is 
close, but not exactly right. I use
COL = INT((79 - LEN(SITE.NAME)) / 2), which, if LEN(SITE.NAME) = 10, is 
34. The exact position would be 34.5, but that half a column is tough to 
do (hence the INT). The original code snippet returned 30.

Charlie

On 11-14-2011 1:19 PM, George Gallen wrote:
> I'm guessing it started out simpler, and extra steps were added to make 
> alignment corrections,
> And nobody bothered to simplify.
>
> -----Original Message-----
> From: u2-users-boun...@listserver.u2ug.org 
> [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Wjhonson
> Sent: Monday, November 14, 2011 1:59 PM
> To: u2-users@listserver.u2ug.org
> Subject: Re: [U2] Simplify, or why mathematicians make better programmers
>
>
> COL = (79-LEN(SITE.NAME)*2+1)/2
>
> Is it just me, or are there people out there who really don't get math ?
> _______________________________________________
> U2-Users mailing list
> U2-Users@listserver.u2ug.org
> http://listserver.u2ug.org/mailman/listinfo/u2-users
> _______________________________________________
> U2-Users mailing list
> U2-Users@listserver.u2ug.org
> http://listserver.u2ug.org/mailman/listinfo/u2-users
>
_______________________________________________
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users
_______________________________________________
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users

Reply via email to