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: 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
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.
Answer This question was answered by Tony Goodman, on Thursday, January 29, 2004 11:39 PM

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


 28-Jan-2004 19:52
User is offline View Users Profile Print this message


David Dawson

Posts: 27
Joined: 11-Mar-2003

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
Report this to a Moderator Report this to a Moderator
 29-Jan-2004 08:39
User is offline View Users Profile Print this message


Tony Goodman

Posts: 1098
Joined: 12-Sep-2002

Answer 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




-------------------------
Tony Goodman
http://www.smartdxl.com
Report this to a Moderator Report this to a Moderator
 29-Jan-2004 18:26
User is offline View Users Profile Print this message


Louie Landale

Posts: 2070
Joined: 12-Sep-2002

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
Report this to a Moderator Report this to a Moderator
Statistics
20925 users are registered to the Telelogic DOORS forum.
There are currently 0 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 0 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.