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: Array index being overwritten w/o "put"???
Topic Summary:
Created On: 18-Sep-2007 16:18
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 Scott Boisvert, on Tuesday, September 18, 2007 5:52 PM

Answer:

Never mind figured it out.

Needed to put "" in the put statement....i.e.

    put (partNumberArray, tempStringOf (partNumber) "", arrayCount, 0)

 18-Sep-2007 16:18
User is offline View Users Profile Print this message


Scott Boisvert

Posts: 348
Joined: 14-Apr-2006

OK... Maybe the one cup of coffee I had today just didn't get the old noggin a running this morning.....  I've got a script where I'm trying to pull part numbers from an object and load them into an array, however the previous entries keep getting overwritten by the next part number that comes in....  Now I've checked the script over and over and there is only one put statement, and the index is incremented each time, so from what I can tell there is no way the previous entries should be getting overwritten.

I've been testing on an object that contains the following object text:

0030-20107-01
0030-20099-01
0100-20029-01
0100-20013-01
0100-20021-01

Yet, when I pull the contents of the first 5 indices of the array I end up with:
 
0100-20021-01
0100-20021-01
0100-20021-01
0100-20021-01
0100-20021-01

The funny thing is I tried pulling the previous index before I insert the data into the new index and the new data has all ready been loaded into the previous indices.....I left the test statements in the attached script.

Any ideas as to what the hell my tired brain is missing???

Thanks,


-------------------------
Scott Boisvert
Engineering Tools Administrator
L-3 Communications - Avionics Systems
scott.boisvert@l-3com.com
Report this to a Moderator Report this to a Moderator
 18-Sep-2007 16:32
User is offline View Users Profile Print this message


Scott Boisvert

Posts: 348
Joined: 14-Apr-2006

Answer Answer

Never mind figured it out.

Needed to put "" in the put statement....i.e.

    put (partNumberArray, tempStringOf (partNumber) "", arrayCount, 0)



-------------------------
Scott Boisvert
Engineering Tools Administrator
L-3 Communications - Avionics Systems
scott.boisvert@l-3com.com
Report this to a Moderator Report this to a Moderator
 18-Sep-2007 23:29
User is offline View Users Profile Print this message


Pete Kowalski

Posts: 301
Joined: 7-Feb-2003

Perhaps, you need to start drinking another brand of coffee?

-------------------------
pete.kowalski(at)motorola.com
Report this to a Moderator Report this to a Moderator
Statistics
20925 users are registered to the Telelogic DOORS forum.
There are currently 2 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 2 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.