Re: Fraction Maker Revisited Solved?
Re: Fraction Maker Revisited Solved?
- Subject: Re: Fraction Maker Revisited Solved?
- From: David Andrews <email@hidden>
- Date: Sat, 6 Nov 2004 22:50:41 -0500
Jason,
Opps, I think I over did it. Is this what you are trying to do:
set vNumberToFraction to 0.55
set vBottomNumber to 32
set parts to 1 / vBottomNumber
set num to round (vNumberToFraction / parts)
set denom to vBottomNumber
repeat while (num div 2) is (num / 2) -- (don't need round here)
set num to num div 2
set denom to denom div 2
end repeat
set vFractionFound to "" & num & "/" & denom --> "9/16"
David A
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden