• 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: If Statements
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: If Statements


  • Subject: Re: If Statements
  • From: "Mark J. Reed" <email@hidden>
  • Date: Sat, 13 Sep 2008 14:32:28 -0400

"Seems" was an accurate indicatiom of my confidence in the statement.
It seemed to be true.  I hadn't done enough experimentation to
convince myself that it was universally true, nor enough reading to
convince myself that it was intended to be so. I simply prefer not to
make bald statements when I don't have stronger evidence.  But I don't
see how my statement was in any way "misleading".




On 9/13/08, Axel Luttgens <email@hidden> wrote:
> Le 13 sept. 08 à 17:35, Mark J. Reed a écrit :
>
>>> [...]
>>
>> Not a bug.  The comparison seems to be based on the type of the left
>> hand side of the operator.
>
> And just to be more precise: "seems" is misleading, as AppleScript
> always has coerced the right-hand operand accordingly to the type of
> the left-hand operand in the case of binary operators.
>
> For example, in the "new" ASLG, on may read about the ">" operator (p.
> 184):
>
> 	"Both operands must evaluate to values of the same class. If they
> don't,
> 	AppleScript attempts to coerce the right-hand operand to the class of
> the
> 	left-hand operand."
>
>
>> So (10 > "5") is true, because it converts the string to a number and
>> does a numeric comparison.  But ("5" < 10) is false because it
>> converts the number to a string and does a lexicographic comparison.
>
> Yep :-)
> Axel _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> AppleScript-Users mailing list      (email@hidden)
> Help/Unsubscribe/Update your Subscription:
> Archives: http://lists.apple.com/archives/applescript-users
>
> This email sent to email@hidden
>

--
Sent from Gmail for mobile | mobile.google.com

Mark J. Reed <email@hidden>
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Follow-Ups:
    • Re: If Statements
      • From: Axel Luttgens <email@hidden>
References: 
 >If Statements (From: William J Sisti <email@hidden>)
 >Re: If Statements (From: Ed Stockly <email@hidden>)
 >Re: If Statements (From: Skeeve <email@hidden>)
 >Re: If Statements (From: Ed Stockly <email@hidden>)
 >Re: If Statements (From: Skeeve <email@hidden>)
 >Re: If Statements (From: Ed Stockly <email@hidden>)
 >Re: If Statements (From: Ed Stockly <email@hidden>)
 >Re: If Statements (From: "Mark J. Reed" <email@hidden>)
 >Re: If Statements (From: Axel Luttgens <email@hidden>)

  • Prev by Date: Re: If Statements
  • Next by Date: Re: set optionKeyDown to...
  • Previous by thread: Re: If Statements
  • Next by thread: Re: If Statements
  • Index(es):
    • Date
    • Thread