The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum for Programming
 LabTalk Forum
 delete variables
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

Flavs

Spain
Posts

Posted - 09/07/2006 :  10:31:56 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Version (Select Help-->About Origin): 7.5
Operating System: win xp sp2

Im having some problems with my scripts due to the problem that all the variables are global. how do I clear all the variables? some of the variables?, Can I define local variables?

By the way I know that the problems are with the variables because if I change the names of the variables, the scripts start working.

Thanks.

Mike Buess

USA
3037 Posts

Posted - 09/07/2006 :  10:48:09 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
del -v var1; // delete the variable var1
del -v var*; // delete all variables whose names start in var

Local LabTalk variables are not supported so it's good practice to initialize relevant variables at the start of the script that uses them. Also helps to delete them at the end of the script.

Mike Buess
Origin WebRing Member
Go to Top of Page

Flavs

Spain
Posts

Posted - 09/10/2006 :  12:17:05 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thanks!! That helps.
Go to Top of Page

SvenP

29 Posts

Posted - 08/19/2010 :  08:37:59 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
It is not working for me. Also my script is not working anymore.

del -v %N;
%N=;
BookAu30wG830B
Go to Top of Page

Laurie

USA
404 Posts

Posted - 08/19/2010 :  10:19:20 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
What version do you have? In Origin 8.1:

"delete -v" deletes numeric variables
"delete -vs" deletes string variables but this does not work with %N which is a string register. To clear the contents simply use the following:

%N="";

OriginLab Technical Support
Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000