![]() |
Telelogic DOORS (steve huntington) | ![]() |
new topic :
profile :
search :
help :
dashboard :
calendar :
home
|
||
Latest News:
|
|
Topic Title: Gathering metrics by setting filters; returning values from functions Topic Summary: Created On: 28-Jan-2004 19:52 Status: Post and Reply |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() Answer: David, Remove the ampersands from the RV_accpt and RV_rjct parameters. These are used in the function declaration, not the actual parameters. Also, it seems that if you are using the optional return value parameters, then the module parameter must also be used. This is not what the syntax says in the user manual. Adding parentheses to the function call highlighted this problem! Module m = current int RV_accpt = 3, RV_rjct = 7 Filter RV = attribute "Clarity" == "High" filtering on set( m, RV, RV_accpt, RV_rjct) print RV_accpt print RV_rjct | |
![]() |
|
I have a simple task that I believe should have a simple answer. So far, my inexperience with dxl is getting in the way.
The idea is to collect metrics by setting filters on the items I wish to track and use the number of items accepted and rejected by the filter to provide my counts. Following is a code snippet that I believe should work. Of course, it doesn't. int RV_accpt = 3, RV_rjct = 7 Filter RV = attribute "STG_Status" == "RV" filtering on set RV, &RV_accpt, &RV_rjct print RV_accpt print RV_rjct When this code is executed, the filter is set, but the results of the Print statements are 3 and 7, the values initially set, rather than the number of objects accepted and rejected. What obvious detail am I missing that is preventing the return of values from the set function? DOORS 5.2 by the way. Many thanks in advance to anyone who can help. ------------------------- You never know where you're going 'til you get there Edited: 28-Jan-2004 at 19:54 by David Dawson |
|
![]() |
|
![]() |
|
David,
Remove the ampersands from the RV_accpt and RV_rjct parameters. These are used in the function declaration, not the actual parameters. Also, it seems that if you are using the optional return value parameters, then the module parameter must also be used. This is not what the syntax says in the user manual. Adding parentheses to the function call highlighted this problem! Module m = current int RV_accpt = 3, RV_rjct = 7 Filter RV = attribute "Clarity" == "High" filtering on set( m, RV, RV_accpt, RV_rjct) print RV_accpt print RV_rjct ------------------------- Tony Goodman http://www.smartdxl.com |
|
![]() |
|
![]() |
|
Don't forget that many DXL commands including "filtering" presume the "current module". The only way to insure you KNOW what the "current module" is to explicetely set it, since a veriety of DXL stuff will ..err.. often will CHANGE the current module.
You your example, the "Module m = current" command is probably at the top of the DXL. If so, be sure to insert a "current = m" before the "filtering" command. This applies for all commands that presume the "current" module, such as attribute create and find. - Louie |
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.