Ahh a classic Operational Research 'Packing' Problem. Comes in many
shapes and forms. These problems 'seem' to be quite simple, until you start
looking at the options. Take a look at
http://arp.anu.edu.au/www/software/piclay/html/piclaydemo.html
Which states "Arranging pictures or photograph
Not sure just adding 0.5 would give the required result (if I understand the
problem correctly).
ie
tresult=round(x+0.5)
With three examples for x say 3.9, 4.0, and 4.1
tresult returns 4, 5 and 5
As the middle number is an integer then I'd guess it doesn't need rounding
up, so the required resu
Check out the trunc function. It only returns the integer part of a number.
if trunc(x)=x then--check the number is an integer
return x
else
return (trunc(x)+1) -- if not then return the next integer
above
end if
I hope this is what you're after !
Regards
There's something I remember from my SuperCard days called "RAD Windows"
(XCMD) which did this, although haven't heard anything about this recently.
Check out
http://www.vortex.uk.com/_tutorials/supercard/sc-examples/scexamples.html
For Widget examples which (apparantly) "Make SuperCard windows