Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Mumps > Re: % only as a...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 2 of 6 Topic 959 of 992
Post > Topic >>

Re: % only as a variable

by "Maury Pepper" <mpepper_scram_spam@[EMAIL PROTECTED] > May 12, 2008 at 12:05 AM

----- Original Message ----- 
From: "Duke Normandin" <dukeofperl@[EMAIL PROTECTED]
>
Sent: Sunday, May 11, 2008 5:44 PM
Subject: % only as a variable


> Sorry! but here goes with another dumb noob question.
>
> From some Mumps literature that I've been able to garner from the
> Internet, I've seen a standalone % used as a variable, yet never
> being used thereafter, e.g.,
>
> zmain
> for i=0:1:10 do
> . for j=1:1:10 do
> .. set ^A(i,j)=5
> set %=$zzCentroid(^A,^B)
> for i=1:1:10 write ^B(i),!
>
> When % is used this way, what is it doing?
> -- 
> Duke Normandin

First of all, there's nothing special about % as a variable -- it's no 
different than x or I.  In this example, % is used as a dummy to receive 
whatever value is returned by the $zzCentroid function, but that value is
of 
no interest in this example. This function computes a centroid vector from

an array.  The input array is named by the first parameter and the output 
vector is named by the second parameter.

In standard Mumps, this might be done as:  DO zzCentroid("^A","^B") and 
thus, not have to worry about a returned value.  The example you found is 
from O'Kane's MUMPS Compiler, and that is not standard Mumps. For one
thing, 
it does not sup****t DO with parameters.
 




 6 Posts in Topic:
% only as a variable
Duke Normandin <dukeof  2008-05-11 22:44:44 
Re: % only as a variable
"Maury Pepper"   2008-05-12 00:05:02 
Re: % only as a variable
Kevin O'Kane <okane@[E  2008-06-04 20:57:51 
Re: % only as a variable
Ed de Moel <demoel@[EM  2008-06-05 10:50:10 
Re: % only as a variable
David Hubball <davidhu  2008-07-11 12:34:18 
Re: % only as a variable
rodd@[EMAIL PROTECTED] (  2008-07-13 17:01:21 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Fri Jul 25 18:22:09 CDT 2008.