• 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: coerce lists to records
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: coerce lists to records


  • Subject: Re: coerce lists to records
  • From: Allen Watson <email@hidden>
  • Date: Fri, 17 Nov 2000 10:51:23 -0800

On or near 11/16/00 10:24 PM, Patrick Wynne at email@hidden observed:

> Hi all,
>
> I have a feeling that this isn't possible, but is there any way to
> coerce a list of strings into a record, with the odd-numbered strings
> as the record labels?
>
> Example:
>
> {"firstname", "Robert", "lastname", "Robertson"}
> becomes
> {firstname: "Robert", lastname: "Robertson"}
>
> I would prefer to do this without using an osax, but I will if I have
> to.

I know you don't want to use an osax, but there is one just in case:

Eric Grant, <email@hidden>, also has authored the
Sigma's Coercions scripting addition, which has coercions
for

Class user record:

{"a", 1, "b", 2, "c", 3} as user record

-- > {a: 1, b: 2, c: 3}

Class user list:

{a: 1, b: 2, c: 3} as user record

-- > {"a", 1, "b", 2, "c", 3}


http://home.earthlink.net/~eagrant/

--
Peace be with you!
Allen <email@hidden> XNS Name: =Allen Watson
My web page: <http://home.earthlink.net/~allenwatson/>


References: 
 >coerce lists to records (From: Patrick Wynne <email@hidden>)

  • Prev by Date: Re: Offset in paragraphs
  • Next by Date: Subject: QuarkXpress current page number
  • Previous by thread: Re: coerce lists to records
  • Next by thread: Subject: QuarkXpress current page number
  • Index(es):
    • Date
    • Thread