🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #14709

Re: Rounding UP doesn't seem to work???

#14709
From: Shane_Stanley
Date: Sun, 18 Jan 2004 10:15
21 lines
1317 bytes
On Jan 18, 2004, at 5:41 PM, Casey D'Andrea wrote:

> set myNumberOfPages to round (myNumberOfFrames / myFramesPerPage) 
> rounding up --->36/16=2.25 --->2

What version of the OS are you using? What happens if you just run:

set myNumberOfFrames to 36
set myFramesPerPage to 16
set myNumberOfPages to round (myNumberOfFrames / myFramesPerPage) 
rounding up

Very odd...

Anyway, you could always use this instead -- it's even a touch faster:

set myNumberOfPages to (myNumberOfFrames + myFramesPerPage - 1) div 
myFramesPerPage

--
Shane Stanley <sstanley@myriad-com.com.au>
Technical Details
Message-ID: <47AFC7E2-499F-11D8-B512-003065D61B90@myriad-com.com.au>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.tpinternet.pl!newsfeed01.sul.t-online.de!t-online.de!webx
References: <2ccf6e6c.-1@webx.la2eafNXanI>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f939a,516fe897c96e5a69
X-Google-Attributes: gidf939a,public
X-Google-ArrivalTime: 2004-01-18 02:37:31 PST
From: Shane_Stanley@adobeforums.com
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.tpinternet.pl!newsfeed01.sul.t-online.de!t-online.de!webx
Newsgroups: adobe.scripting.indesign
Subject: Re: Rounding UP doesn't seem to work???
Message-ID: <47AFC7E2-499F-11D8-B512-003065D61B90@myriad-com.com.au>
Date: Sun, 18 Jan 2004 02:15:45 -0800
References: <2ccf6e6c.-1@webx.la2eafNXanI>
Lines: 22
X-Mailer: Apple Mail (2.609)
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit