Re[2]: Packing Commas in a Quiz - but not too many

Leonard_Berkowitz@harvardpilgrim.org Leonard_Berkowitz@harvardpilgrim.org
Fri, 8 May 1998 08:09:16 -0400


Tony's answer is a good one. I'd add:

ELSE "" <that's a null string> or perhaps
ELSE " " and count on PACK to squeeze out the extra space(s).

Alternatively, you could send these folks to school to earn all three titles
<grin>.

====================
Leonard S. Berkowitz
(work) mailto:Leonard_Berkowitz@hphc.org
(home) mailto:lberkowitz@earthlink.net


______________________________ Reply Separator _________________________________
Subject: Re: Packing Commas in a Quiz - but not too many
Author:  powerh-l-owner@lists.swau.edu at INTERNET
Date:    5/8/98 1:15 AM


Max
What about ...

DEF CLU  CHA*06 = ", CLU " if he's earned a CLU
DEF CHFC CHA*06 = ", ChFC" if he's earned that one
DEF RHU  CHA*06 = ", RHU " if he's earned it

Tony Knowles     tony_knowles@ferntree.co.nz
                 ajk@ihug.co.nz

----------
> From: Max Buten <maxbuten@home.com>
> To: powerh-l@lists.swau.edu
> Subject: Packing Commas in a Quiz - but not too many
> Date: Friday, 8 May 1998 15:14
>
> The college likes to address its designees as John Jones, CLU, ChFC, RHU
> -
> if Mr Jones has those designations.  I'm having trouble getting the
> right number of commas.  The Quiz code I'm using (on HP3000 in version
> 7.09)
> is this:
>
> DEF CLU  CHA*04 = "CLU " if he's earned a CLU
> DEF CHFC CHA*04 = "ChFC" if he's earned that one
> DEF RHU  CHA*04 = "RHU " if he's earned it
> DEF FULL-NAME CHA*40 = PACK("John Jones" + ", " + CLU + ", " + CHFC + ",
> " + RHU)
>
> This works fine for somebody with CLU.  However if Jones only has RHU, I
> get
>
> John Jones,,, RHU
>
> which is pretty ugly.
>
> John Jones, RHU    would be much better.
>
> Surely, somebody has faced and solved this problem?
>
> Max
> --
> Max Buten - Powerhouse Programming Consultant - maxbuten@home.com -(610)
> 664 2301
> at The American College: MaxB@AmerColl.edu - fax:(610) 526 1276  - (610)
> 526 1297
> = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
=
> Subscribe: "subscribe powerh-l" in message body to
majordomo@lists.swau.edu
> Unsubscribe: "unsubscribe powerh-l" in message to
majordomo@lists.swau.edu
> powerh-l@lists.swau.edu is gatewayed one-way to bit.listserv.powerh-l
> This list is closed, thus to post to the list, you must be a subscriber.
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
Subscribe: "subscribe powerh-l" in message body to majordomo@lists.swau.edu
Unsubscribe: "unsubscribe powerh-l" in message to majordomo@lists.swau.edu
powerh-l@lists.swau.edu is gatewayed one-way to bit.listserv.powerh-l
This list is closed, thus to post to the list, you must be a subscriber.
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
Subscribe: "subscribe powerh-l" in message body to majordomo@lists.swau.edu
Unsubscribe: "unsubscribe powerh-l" in message to majordomo@lists.swau.edu
powerh-l@lists.swau.edu is gatewayed one-way to bit.listserv.powerh-l
This list is closed, thus to post to the list, you must be a subscriber.