compactness of expression question
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