• 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: Why the speed difference? (was: Problem with modification date of file...)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Why the speed difference? (was: Problem with modification date of file...)


  • Subject: Re: Why the speed difference? (was: Problem with modification date of file...)
  • From: Mr Tea <email@hidden>
  • Date: Thu, 14 Nov 2002 10:43:05 +0000

This from Andy Wylie - dated 14/11/02 7:59 am:

>> set theFolder to alias [path to folder]
>
> eh?

Perhaps I should have been more explicit, or used something that doesn't
compile. By using square brackets, I hoped to indicate that the phrase 'path
to folder' meant 'insert your own path to a folder that exists on your local
disks here'. This is fairly conventional usage (in the ASLG, square brackets
"indicate that the enclosed language element or elements are optional").
What would you prefer?

Anyway, why do square brackets compile? Do they have some specific AS
function? Are they used in some hideous code language that AS has been
forced to accommodate?

Script Editor seems to treat them as things to wrap lists in, and converts
them to the conventional braces in script results, but is sometimes confused
by them.

[1, 2, 3] & 4
--> {1, 2, 3, 4}

set end of [1, 2, 3] to 4
--> error: "Can't set end of {1, 2, 3} to 4

set l1 to {[1, 2, 3]}
set end of l1 to [4]
l1
--> {{1, 2, 3}, {4}}

It would be more straighforward (and would significantly extend the life
expectancy of my shift key) if square brackets just compiled as braces -
unless they are the vanguard of some sinister hidden agenda, in which case I
think we should be told.


Mr Tea
_______________________________________________
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.

  • Follow-Ups:
    • Re: Why the speed difference? (was: Problem with modification date of file...)
      • From: Paul Berkowitz <email@hidden>
References: 
 >Re: Why the speed difference? (was: Problem with modification date of file...) (From: Andy Wylie <email@hidden>)

  • Prev by Date: (no subject)
  • Next by Date: Re: Box Overflows in Xpress 4.11 part 2
  • Previous by thread: Re: Why the speed difference? (was: Problem with modification date of file...)
  • Next by thread: Re: Why the speed difference? (was: Problem with modification date of file...)
  • Index(es):
    • Date
    • Thread