• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Floor & Ceiling (no walls yet)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Floor & Ceiling (no walls yet)


  • Subject: Re: Floor & Ceiling (no walls yet)
  • From: Deivy Petrescu <email@hidden>
  • Date: Tue, 3 Feb 2004 10:05:55 -0500

At 5:10 PM -0600 2/2/04, ehsan saffari wrote:
Hi

Here is my attempt at defining Floor & Ceiling functions in AppleScript:

Anything wrong there? Can they be improved?

----Get Ceiling of a number----

on getceil(x)
if x > 0 then
set y to (x div 1) + 1
else if x < 0 then
set y to (x div 1)
end if
return y
end getceil
----

Ehsan
here is my ceiling

on teto(x)
set xd to (x div 1)
if xd < x then return xd + 1
return xd
end teto
--
Regards
Saudagues

Deivy
http://www.dicas.com
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

References: 
 >Floor & Ceiling (no walls yet) (From: ehsan saffari <email@hidden>)

  • Prev by Date: Re: Flawed ?
  • Next by Date: Tex-Edit Plus script (was: Flawed ?)
  • Previous by thread: Re: Floor & Ceiling (no walls yet)
  • Next by thread: Flawed ?
  • Index(es):
    • Date
    • Thread