![]() |
Telelogic DOORS (steve huntington) | ![]() |
new topic :
profile :
search :
help :
dashboard :
calendar :
home
|
||
Latest News:
|
|
Topic Title: Replacing a boolean operator Topic Summary: Replace "or" "and" by values derived through code Created On: 24-May-2007 23:27 Status: Post and Reply |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() |
|
I am working on a script that will search for one or more words in the object text, and if found will copy the object text to a new object in another module. I am using the regular expressions and the 'if ' function to find the objects and do the rest.
The relevant portion of the code is attached. I want to select "and" "or" through the radio button DBE and use that value as the boolean operator in the 'if' function. The function does not work when I replace the "or" "and" with the value derived through code from the DBE output. Probably I am following the wrong path. Will someone advise me how best I can do it? |
|
![]() |
|
![]() |
|
The only way you can use a string as an operator is with:
-- eval_ or --where DOORS evalutes a string to a script where there are several cases. However, you can test tje string and then branch based on the test. ie., if(selectOne=="or") print "or" else print "and" Edited: 25-May-2007 at 00:24 by ron lewis |
|
![]() |
|
![]() |
|
Thanks for the tip, Ron. I used a workaround through the use additional of boolean variables to identify the "And" "Or" entry in the dialog box.
- Krishna |
|
![]() |
Telelogic DOORS
» DXL Exchange
»
Replacing a boolean operator
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.