![]() |
Telelogic DOORS (steve huntington) | ![]() |
new topic :
profile :
search :
help :
dashboard :
calendar :
home
|
||
Latest News:
|
|
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 |
![]() |
![]()
|
![]() |
|
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 |
|
![]() |
|
![]() |
|
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 |
|
![]() |
|
![]() |
|
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 |
|
![]() |
|
![]() |
|
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 |
|
![]() |
Telelogic DOORS
» DXL Exchange
»
Determining size of (dynamic) Array
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.