I always felt like the MDC must have regretted letting $P(X,"^") refer to the 1st piece.  In my mind that is a lazy feature and it blocked the logical use to express the number of pieces.  But, alas, I wasn't a member of the MDC, so I don't know if this was ever discussed when they arrived at $L(X,"^").

Kevin Toppenberg wrote:
Ahhh, it's the $length command.

Thanks!

Kevin

On 11/30/05, Chris Richardson <[EMAIL PROTECTED]> wrote:
  
Easily done;
    
S X="a,b,c,d^e,f"
F I=1:1:$L(X,",")   W I_">>"_$P(X,",",I),!
      
1>>a
2>>b
3>>c
4>>d^e
5>>f
    
F I=1:1:$L(X,"^")  W I_">>"_$P(X,"^"),!
      
1>>a,b,c,d
2>>e,f

----- Original Message -----
From: "Kevin Toppenberg" <[EMAIL PROTECTED]>
To: "Hardhats Sourceforge" <hardhats-members@lists.sourceforge.net>
Sent: Wednesday, November 30, 2005 6:31 PM
Subject: [Hardhats-members] How to count pieces?


It seems like I saw code once that counted pieces,  ie.

"a,b,c,d^e,f"  ---> 5 pieces, using "," as a divider, and 2 pieces,
using "^" as a divider.

It seems like this was done with a Mumps command?
Can someone tell if this is possible?

Thanks
Kevin


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_idv37&alloc_id865&op=ick
_______________________________________________
Hardhats-members mailing list
Hardhats-members@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hardhats-members






-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
Hardhats-members mailing list
Hardhats-members@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hardhats-members

    


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_idv37&alloc_id865&op=click
_______________________________________________
Hardhats-members mailing list
Hardhats-members@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hardhats-members

  

-- 
Greg Kreis      http://www.PioneerDataSys.com

"You are today where your thoughts have brought you, you will
   be tomorrow where your thoughts take you." (James Lane Allen)

Reply via email to