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: Iterating over a table row
Topic Summary:
Created On: 5-Jan-2005 09:42
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 Antonio Norkus, on Wednesday, January 5, 2005 1:47 PM

Answer:
Hi Paul,

the syntax for "for" loops has its own set of rules. For example, to loop through all module attributes the following is used...

for modAttrName in attributes(current Module) do

there is no "attributes" function...it's just DXL's way of specifying what type of loop is required. In your case, the "row" statement specifies that a loop through all objects in a row is required.

Cheers,
Antonio.
 5-Jan-2005 09:42
User is offline View Users Profile Print this message


Paul Worrall

Posts: 87
Joined: 30-Sep-2003

Object o
for o in row(current Object) do
{
...
}

What's going on here?

According to the DXL manual, the 'row' function returns a boolean, so this loop seems to be iterating over a boolean value, but in fact it iterates over the cells in the row. Its as though the row function returns the row header object like the getRow function, but if I try Object oR = row(current Object), an error occurs.
Report this to a Moderator Report this to a Moderator
 5-Jan-2005 13:14
User is offline View Users Profile Print this message


Antonio Norkus

Posts: 109
Joined: 28-Jun-2003

Answer Answer
Hi Paul,

the syntax for "for" loops has its own set of rules. For example, to loop through all module attributes the following is used...

for modAttrName in attributes(current Module) do

there is no "attributes" function...it's just DXL's way of specifying what type of loop is required. In your case, the "row" statement specifies that a loop through all objects in a row is required.

Cheers,
Antonio.
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.