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

Re: Records


  • Subject: Re: Records
  • From: email@hidden
  • Date: Wed, 28 Feb 2001 21:09:58 EST

In a message dated 2/28/01 1:42:25 PM, Olof wrote:

>Here's the easiest way to do it using only the standard additions:
>
>__begin script__
>
>to usrf(theList)
> set n to {+class usrf;:theList}
> run script "
> to run (arg)
> arg as record
> end run " with parameters n
>end usrf
>
>usrf({"a", 1, "b", 2})
>
>__ end script__
>
>
>As the mailing list will undoubtedly choke on the chevrons, the second line
>of the script is
>
> set n to {<right-chevron>class usrf<left-chevron>:theList}
>
>where
>
> <right-chevron> is option backslash
> <left-chevron> is shift option backslash

Left and right chevrons aside, this is f**king brilliant, ranking up there
with Motoyuki Tanaka's [":" as alias as string]. However, I have absolutely
no idea why it works, nor any guess as to how you came up with it.

The challenge now is how to take advantage of it. Looking up data in a record
is much, much faster than looping thru a list of field/value pairs or using
the TIDs, but in 9.1 the ability to write a record to a file apparently got
damaged, so I need to figure out how to store the resulting record for future
use.

This is going to occupy valuable parts of my brain for weeks.....

Jeff Baumann
email@hidden
www.linkedresources.com

15 Days, 5 Hours, 1 Minutes
How is it going to end?


  • Prev by Date: Re: I want to convert a list of integers to their negative self
  • Next by Date: Scripting Additions
  • Previous by thread: [OFF] Re: Records
  • Next by thread: Re: Records
  • Index(es):
    • Date
    • Thread