![]() |
Telelogic DOORS (steve huntington) | ![]() |
new topic :
profile :
search :
help :
dashboard :
calendar :
home
|
||
Latest News:
|
|
Topic Title: DXLObject Array Topic Summary: DXLObject Array Created On: 24-Oct-2007 20:32 Status: Post and Reply |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() |
|
Did a little work with DXLObjects, declaring an array. See attached for example. Take note of these things:
[] the clever way to get 'new' in line 4 to get repeated SizeDXL times. [] retrieving the data in line 11 should be typed (int and string). Take the 'int' out of line 11 and see what gets printed (for me its History type constants). [] Consider the following use for this: for usr in userList do; CountUsers++ DxlObject dUsers[CountUsers] = {int i; for (i=0; i<CountUsers; i++) new()) i = 0 for usr in userList do { dUsers->"Name" = usr.name dUsers->"Email" = usr.email dUsers->"Type" = usr.class } - Louie |
|
![]() |
|
![]() |
|
I make use of DxlObjects quite a lot.
I like the declaration trick Louie - never knew you could do that. Thanks. It also works for other types. ------------------------- Tony Goodman http://www.smartdxl.com |
|
![]() |
|
![]() |
|
Yes, really nice. However, I'd like to suggest to add explicit deletion of the dxlObjects to the script; when called very often, e.g. in layoutDXL, memory consumptiom can grow up otherwise:
for (i=0; i<SizeDXL; i++){delete dDxl} at the end of the script works fine for me. Regards, Peter P.S.: Is it only me, or do you also see all text after the first closing curly bracket in italics? This forum has a life on its own... Edited: 25-Oct-2007 at 09:56 by Peter Albert |
|
![]() |
|
![]() |
|
Thanks for the info Louie. I might have to look into using these in the future.
quote: No. I see all the code in italics. ------------------------- David Pechacek AAI Services Textron dpechacek@sc-aaicorp.com David.Pechacek@gmail.com |
|
![]() |
|
![]() |
|
I'm still an 'Amish Programmer', and while I dealt with clever 'structures' in school 'many' years ago, I've never had to deal with them since. I really don't see much use for these DxlObjects, as you can do just about the same thing with parellel arrays. Would be interested in seeing a practical example of using them.
When you say 'it also works for other types', are you talking about that clever line #4 construct will work for something other than DxlObjects? - Louie |
|
![]() |
|
![]() |
|
Yes, Louie.
I tried your clever line 4 and it works for an array of integers. ------------------------- Tony Goodman http://www.smartdxl.com |
|
![]() |
Telelogic DOORS
» DXL Exchange
»
DXLObject Array
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.