![]() |
Telelogic DOORS (steve huntington) | ![]() |
new topic :
profile :
search :
help :
dashboard :
calendar :
home
|
||
Latest News:
|
|
Topic Title: exit_() Doors testing Topic Summary: Created On: 5-Jul-2006 18:36 Status: Post and Reply |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() |
|
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? |
|
![]() |
|
![]() |
|
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 |
|
![]() |
|
![]() |
|
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 |
|
![]() |
|
![]() |
|
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 |
|
![]() |
|
![]() |
|
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 |
|
![]() |
|
![]() |
|
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 |
|
![]() |
Telelogic DOORS
» DXL Exchange
»
exit_() Doors testing
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.