Thanks Steven,

You're right.  I posted that too quickly, before I had checked my syntax.

Thanks
Kevin

P.S.  Another way to check matching parentheses is to use an editor like KATE that highlights matching parenthesis when you put one's cursor on one of them.  But obviously, it didn't keep me out of trouble :-)

Kevin


On 1/1/06, Steven McPhelan <[EMAIL PROTECTED]> wrote:
No.  Your "same thing" is an invalid M syntax
 
S (J(N),DK)=+$P(@(R_"0)"),U,2)
 
If you follow VA SAC programming standards, your second line is in violation of SAC as the naked reference does not have the explicit reference preceding it on the same command line.  It is valid M syntax.  But the SAC standard is there for very good reasons for maintaining code of the life time of the program.  It can be burdensome.  But VA experience has proven the wisdom of that standard in general.
 
Someone a long time ago showed me a trick for counting parentheses to make sure you have the right amount:
 
set (J(N),DK)=+$piece(@(R_0)),U,2)
      1 2 1    0             1   2    1 0    -1
 
Lloyd has a very good trick for preserving the right number of parentheses also:
S () = +$P()
S (J(N),DK) = +$P(@(),U,2)
S (J(N),DK) = +$P(@(R_"0)"),U,2)
 

 
On 12/31/05, Kevin Toppenberg <[EMAIL PROTECTED] > wrote:
I found the following line in the file DIS.m

 set @("(J(N),DK)=+$piece("_R_"0),U,2)"),R=$piece(^(0),U)

would this be the same thing?

set (J(N),DK)=+$piece(@(R_0)),U,2)
set R=$piece(^(0),U)

Thanks
Kevin




--
Steven McPhelan
"Action springs not from thought, but from a readiness for responsibility." - Dietrich Bohhoeffer

Reply via email to