Packing Commas in a Quiz - but not too many

Tony Knowles tony_knowles@ferntree.co.nz
Fri, 8 May 1998 16:26:35 +1200


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.