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: Determining size of (dynamic) Array
Topic Summary: No reference to Array found
Created On: 8-Dec-2005 13:27
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.
 8-Dec-2005 13:27
User is offline View Users Profile Print this message


Oliver Röpke

Posts: 42
Joined: 23-Nov-2005

Hi at all!

Does anybody know if there's something like a getter for the dimensions of an Array, e.g.
void getSize( int& x, int& y )?

Oliver

-------------------------
Greetings,<BR>Oliver<BR><BR><BR>Oliver Roepke<BR>Axis Engineering AG, Munich
Report this to a Moderator Report this to a Moderator
 8-Dec-2005 13:56
User is offline View Users Profile Print this message


Reik Schroeder

Posts: 361
Joined: 28-Jul-2003

Hi Oliver,

AFAIK there is no possibility to get this dimensions.
You have to track them yourself in some extra variables (or Skip lists).

The same problem occours on empty places in Array and incorrect type requests.
When you try to get back an incorrect variable type from an Array, you may run into Acces Violation Exception!
The only exception is type int, which should be useable anytime??!

Greetings
Reik

-------------------------
Evosoft GmbH
for Siemens Industry Sector


Berlin, Germany
Report this to a Moderator Report this to a Moderator
 8-Dec-2005 19:41
User is offline View Users Profile Print this message


Shawn Stepper

Posts: 96
Joined: 6-Aug-2004

Reik is correct. You can not get the size of an array from the array itself.

One solution I have found is to always store the size of the array as the first element in the array. As you update the array, you also update the size of it in the first element.

-------------------------
Shawn Stepper
shawn.e.stepper@wellsfargo.com
Report this to a Moderator Report this to a Moderator
 4-Jan-2006 15:49
User is offline View Users Profile Print this message


Oliver Röpke

Posts: 42
Joined: 23-Nov-2005

Hi Reik,
hi Shawn,

thank you for your answers. That's what I feared.
But the idea of tracking the array dimensions at the beginning of the array itself seams to be comfortable. Now I'm tracking the dimension in extra variables.


-------------------------
Greetings,<BR>Oliver<BR><BR><BR>Oliver Roepke<BR>Axis Engineering AG, Munich
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.