Thanks Greg and Benjamin.

That helped

Kevin

--- Greg Kreis <[EMAIL PROTECTED]> wrote:

> Kevin Toppenberg wrote:
> 
> >Hey all,
> >
> >Quick Mumps question.  I have a loop like this:
> >
> >-------------------
> >MyFunct()
> >
> >  new MyVar
> >
> >Label1
> >  kill MyVar    ;<---- should this be new MyVar?
> >  set result=$$Func2(.MyVar)
> >
> >  goto Label1
> >-------------------
> >
> >I want to ensure that any old data from a previous
> >loop is cleaned out before calling Func2.  Should I
> >use 'new' or 'kill' each time?
> >
> You should kill, since you used NEW upon first
> entering the scope of 
> this function.  It is yours to kill.
> 
> >  What is 'new' really
> >doing?  Allocating memory?
> >
> NEW is hiding any existent values in the newed
> variable. This typically 
> means memory is not freed up and because the
> variable is hidden, it has 
> in effect been KILLed, as far as the current scope
> is concerned.  The 
> difference is that 'being killed' by a NEW permits
> resurrection.
> 
> >  If so, then I don't want
> >to repeatitively use up memory. 
> >
> Right.
> 
> > On the other hand, if
> >I use kill, then I think I would get an error
> trying
> >to pass a non-existant variable.
> >  
> >
> When you pass by reference, as you are in the
> example, the variable does 
> not need to exist.  In fact calling-by-reference
> (with the period 
> prefix) using a non-existent variable is a common
> technique when wanting 
> a function to return a value.
> 
> >Thanks
> >Kevin
> >
> >
> >             
> >_______________________________
> >Do you Yahoo!?
> >Shop for Back-to-School deals on Yahoo! Shopping.
> >http://shopping.yahoo.com/backtoschool
> >
> >
>
>-------------------------------------------------------
> >This SF.Net email is sponsored by: YOU BE THE
> JUDGE. Be one of 170
> >Project Admins to receive an Apple iPod Mini FREE
> for your judgement on
> >who ports your project to Linux PPC the best.
> Sponsored by IBM. 
> >Deadline: Sept. 13. Go here:
> http://sf.net/ppc_contest.php
> >_______________________________________________
> >Hardhats-members mailing list
> >[EMAIL PROTECTED]
>
>https://lists.sourceforge.net/lists/listinfo/hardhats-members
> >
> >  
> >
> 
> -- 
> Greg Kreis                   Pioneer Data Systems,
> Inc.
> http://www.PioneerDataSys.com - VistA Training and
> Consulting
> 
> "Genius is childhood recaptured at will." (Charles
> Baudelaire)
> 
> 
> 
> 
>
-------------------------------------------------------
> This SF.Net email is sponsored by: YOU BE THE JUDGE.
> Be one of 170
> Project Admins to receive an Apple iPod Mini FREE
> for your judgement on
> who ports your project to Linux PPC the best.
> Sponsored by IBM. 
> Deadline: Sept. 13. Go here:
> http://sf.net/ppc_contest.php
> _______________________________________________
> Hardhats-members mailing list
> [EMAIL PROTECTED]
>
https://lists.sourceforge.net/lists/listinfo/hardhats-members
> 



                
__________________________________
Do you Yahoo!?
Yahoo! Mail Address AutoComplete - You start. We finish.
http://promotions.yahoo.com/new_mail 


-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM. 
Deadline: Sept. 13. Go here: http://sf.net/ppc_contest.php
_______________________________________________
Hardhats-members mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/hardhats-members

Reply via email to