Welcome to Telelogic Product Support
  Home Downloads Knowledgebase Case Tracking Licensing Help Telelogic Passport
Telelogic DOORS (steve huntington)
Decrease font size
Increase font size
Topic Title: exit_() Doors testing
Topic Summary:
Created On: 5-Jul-2006 18:36
Status: Post and Reply
Linear : Threading : Single : Branch
Search Topic Search Topic
Topic Tools Topic Tools
Quick Reply Quick Reply
Subscribe to this topic Subscribe to this topic
E-mail this topic to someone. E-mail this topic
Bookmark this topic Bookmark this topic
View similar topics View similar topics
View topic in raw text format. Print this topic.
 5-Jul-2006 18:36
User is offline View Users Profile Print this message


Louie Landale

Posts: 2070
Joined: 12-Sep-2002

v7.1 patch 14.

Testing exiting DOORS. The attached code excercises the "exit_()" function. I notice that when I confirm the exit, the DXL starts all over and goes into a prompt loop. If you confirm a few times and then finally cancel the exit_() takes effects.

Thoughts?
Report this to a Moderator Report this to a Moderator
 6-Jul-2006 15:58
User is offline View Users Profile Print this message


Tony Goodman

Posts: 1098
Joined: 12-Sep-2002

I do not know why calling exit_() messes up the order of execution.
And why on earth does the script run again?

The following does not get confused.
By using eval_ the execution of the exit_() function is delayed until after the current DXL has completed. Hence the need for the halt command.

-------------------------
Tony Goodman
http://www.smartdxl.com

Edited: 6-Jul-2006 at 15:59 by Tony Goodman
Report this to a Moderator Report this to a Moderator
 7-Jul-2006 00:29
User is offline View Users Profile Print this message


Louie Landale

Posts: 2070
Joined: 12-Sep-2002

Haven't had much luck with eval_, but I thought it could "return_" a value used by the script. If so, why do you say the evaluated string runs after this script ends?

- Louie
Report this to a Moderator Report this to a Moderator
 11-Jul-2006 11:49
User is offline View Users Profile Print this message


Tony Goodman

Posts: 1098
Joined: 12-Sep-2002

Sorry, I typed a load of rubbish there.
eval_ and evalTop_ both execute dxl in their own context. Only evalTop_ is delayed until after execution of current DXL has finish.

-------------------------
Tony Goodman
http://www.smartdxl.com

Edited: 11-Jul-2006 at 11:50 by Tony Goodman
Report this to a Moderator Report this to a Moderator
 11-Jul-2006 16:23
User is offline View Users Profile Print this message


Louie Landale

Posts: 2070
Joined: 12-Sep-2002

Still practicing. I notice the following facts: [] Yes eval_ is executed right away and []Yes evalTop_ is executed after the current DXL ends. This means you cannot declare a function inside eval_Top_ and expect the current DXL to use it. Subsequent changes to that function defined in the Top context do take affect, but not until the current DXL ends. [] the 'return_' statement only makes sense for eval_ and not for evalTop_; i.e. string ReturnedMessage = eval_(MyDXL). [] Using a similar construct for evalTop_ you get a text copy of the intended DXL to execute, i.e. string OtherDXL = evalTop_(MyDXL); if (OtherDXL != MyDXL) then Landale is wrong. That doesn't look too useful.

The 'checkDXL' perm looks REAL useful to find non-run-time DXL errors before calling eval_ or evalTop_. I notice, with considerable curiosity, that if the evalTop_ string has DXL interpret errors (such as a misspelled 'prrint' statement) when you call checkDXL and also after the current DXL ends when the evalTop_ code is actually executed, but the code continues to execute as if the offending statement didn't exist. That could be a disaster; encouraging use of "checkDXL" before running evalTop_.

Attached is the code I played with. Notice the prrint statement in line 28.

- Louie
Report this to a Moderator Report this to a Moderator
 11-Jul-2006 20:29
User is offline View Users Profile Print this message


Louie Landale

Posts: 2070
Joined: 12-Sep-2002

A little more info about eval_ and evalTop_. You can define a global variable and access it from the Main or the eval_ or evalTop_ code. You can modify the value and the new value is immediately accessible right away.

However it must be defined globally using evalTop_ before any DXL that uses it is run; otherwise you get DXL errors. Such global declarations should best be done at startup. You cannot redifine it or you get "already defined" DXL errors. You CAN redefine global functions. But keep in mind the evalTop_ code runs after the current DXL ends; thus redefining functions must be done separately (and I don't see why you would want to do that anyway).

Since there is no database login trigger, such globally defined variables and functions should be start of one's startup folder, but that means changing everyone's installation, something they are loath to do here.

I attempted to run evalTop_ from within an eval_ code; hoping that "when the current DXL ends" would mean the end of the eval_ section. But no, the evalTop_ code executed only after the main ended.

- Louie
Report this to a Moderator Report this to a Moderator
Statistics
20925 users are registered to the Telelogic DOORS forum.
There are currently 1 users logged in.
The most users ever online was 15 on 15-Jan-2009 at 16:36.
There are currently 0 guests browsing this forum, which makes a total of 1 users using this forum.
You have posted 0 messages to this forum. 0 overall.

FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.