Kevin,

If you were to use a NEW at that point would like end up with a stack
overflow.

KILL gets rid of the definition of the variable.

NEW creates a new instance of the variable and saves the previous instance
of the variable.  When the function hits a QUIT statement the New instance
goes away and the previous instance returns.

In your example you would continually be adding new instances into the stack
without hitting a QUIT statement and eventually your stack would fill and
error out.

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Kevin
Toppenberg
Sent: Saturday, September 11, 2004 4:42 PM
To: Hardhats Sourceforge
Subject: [Hardhats-members] Mumps question: What is difference between Kill
and New?


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?  What is 'new' really
doing?  Allocating memory?  If so, then I don't want
to repeatitively use up memory.  On the other hand, if
I use kill, then I think I would get an error trying
to pass a non-existant variable.

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



-------------------------------------------------------
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