Re: as is what?
Re: as is what?
- Subject: Re: as is what?
- From: Paul Berkowitz <email@hidden>
- Date: Thu, 28 Aug 2003 07:07:25 -0700
On 8/28/03 2:58 AM, "Nigel Garvey" <email@hidden>
wrote:
>
Christopher Stone wrote on Wed, 27 Aug 2003 07:00:00 -0500:
>
>
> At 20:22 +0900 08/26/2003, micro-people wrought:
>
>
>
>> write (random number from 100 to 5000 as text) to fh
>
> ______________________________________________________________________
>
>
>
> I just glanced at this, but what jumped out at me is above.
>
>
>
> The line above isn't coercing the random number to text; it is coercing
>
> 5000 to text and then back into a number during the calculation.
>
>
>
> set rn to random number from 100 to 5000 as text
>
> set rnClass to class of rn
>
>
Ah! The result's a real. 'Random number' only returns integers when both
>
parameters are integers. Something to remember when either parameter is
>
obtained from another process in the script.
Good.
--
Paul Berkowitz
_______________________________________________
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.