• 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
compactness of expression question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

compactness of expression question


  • Subject: compactness of expression question
  • From: billp <email@hidden>
  • Date: Thu, 17 Jan 2002 14:51:20 -0600

Is there a more compact way I can express the following?:

if ItemKind = "Characters" then
global CharacterCount
set CharacterCount to ItemCount
else
if ItemKind = "Words" then
global WordCount
set WordCount to ItemCount
else
if ItemKind = "Lines" then
global LineCount
set LineCount to ItemCount as integer
else
if ItemKind = "Paragraphs" then
global ParagraphCount
set ParagraphCount to ItemCount as integer
else
if ItemKind = "Tables" then
global TableCount
set TableCount to ItemCount
end if
end if
end if
end if
end if


Thanks,

Bill Planey


  • Follow-Ups:
    • Re: compactness of expression question
      • From: Paul Berkowitz <email@hidden>
    • Re: compactness of expression question
      • From: Steven Angier <email@hidden>
  • Prev by Date: (no subject)
  • Next by Date: how to tell if a particular application is running?
  • Previous by thread: Addressing files without all the object palaver
  • Next by thread: Re: compactness of expression question
  • Index(es):
    • Date
    • Thread