• 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: copy & set statements
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: copy & set statements


  • Subject: Re: copy & set statements
  • From: Timothy Bates <email@hidden>
  • Date: Tue, 23 Oct 2001 23:42:46 +1000

On 23/10/01 11:08 PM, "Nigel Garvey" <email@hidden>
wrote:
> on myHandler(myList)
> set item 1 of myList to "a" -- make a change within the list
> end myHandler
>
> set theCat to {"woody", "hungry"}
>
> myHandler(theCat)
> return theCat
>
> -->>{"a", "hungry"}

Demonstrating that, indeed, handler parameters ARE passed as pointers and
others as values. Geeze, that is a really bad inconsistency in the
language, and one of which I was unaware.

I guess the way around it is that _everything_ should be passed as a
pointer. At least that way you would know what is going on without having to
remember the datatype.

tim


References: 
 >Re: copy & set statements (From: Nigel Garvey <email@hidden>)

  • Prev by Date: Re: [OT?] Multiple Inheritance (was Re: hash arrays and other mysteries)
  • Next by Date: Re: Scaling large images w/ Akua Sweets
  • Previous by thread: Re: copy & set statements
  • Next by thread: Re: copy & set statements
  • Index(es):
    • Date
    • Thread