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
 All Forums
 Origin Forum for Programming
 LabTalk Forum
 Variable stability issue on Origin 2018b (Labtalk)

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
Tryphon Posted - 06/27/2019 : 6:26:29 PM
Hello,

This is a Labtalk code that shows a variable spontaneously modified during the program execution under Origin 2018b :


/* Delete global variables */
  delete -v *;

/* Initialize parameters */
  /* Number of weeks */
  NumberOfWeeks=24;
  /* Variable used to pass the result of a user defined macro */
  Result=0;
  /* Variable used to pass the result of a user R macro */
  gVal=0;

/* test */
  type -c "Step 0, gVal: " $(gVal);
  create TEST -w 2 Week Number;
  type -c "Step 1, gVal: " $(gVal);
  win -cd TEST;
/* end test */


The gVal variable value (0) should not be modified but it is :
gVal = 4.3287

Anyone to reproduce this issue?

The same code executed under Origin 2015 does not show the issue.

Origin Ver. and Service Release : OriginPro 2018b (64-bit) b9.5.5.409
Operating System: Windows 8.1
2   L A T E S T    R E P L I E S    (Newest First)
Tryphon Posted - 07/03/2019 : 10:03:36 AM
Hello,

Understood. I deleted this command from my program. Thank you for this clarification.
yuki_wu Posted - 06/30/2019 : 11:19:23 PM
Hi,

Firstly, we should never touch the system numeric variables. You could use “list v” command to see these variables. This means we should never use “delete -v *;”, which will also delete the system numeric vairables.

We also added this case to our improvement database(ID: ORG-20367), and we will improve the "delete -v *;" command to let user only delete the user-defined variables but keep the system variables in the future version to avoid such issues.

The value of global variables might be changed due to variable name conflicts sometimes. We could rename the variable to avoid such cases.

Regards,
Yuki
OriginLab

The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000