![]() |
Telelogic DOORS (steve huntington) | ![]() |
new topic :
profile :
search :
help :
dashboard :
calendar :
home
|
||
Latest News:
|
|
Topic Title: Module count Topic Summary: Created On: 6-Nov-2004 00:27 Status: Post and Reply |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() |
|
I am writing a script to count number of modules in the database and print their titles and description into a word file. The count is a variable which is incremented.
I want the count to be displayed at the top of the word file which is not possible if I am printing the titles and description as I parse thru the modules. One way is to store the titles and description in an array/skiplist. Is there a way to do this without using arrays/skiplists? Thanks! |
|
![]() |
|
![]() |
|
Easiest way to do it is create a string or buffer then append the count to the front of the string/buffer before outputing to file --
Another way is to iterate twice trough the database -- 1st time to generate the count -- 2nd time to generate the list. |
|
![]() |
|
![]() |
|
Add the names and descriptions to a buffer. When done with the loop, output the count and the contents of the buffer to the file. May look like:
Buffer Results = create int Count = 0 Item itm for itm in database do { Results += name(item) "\t" path(itm) "\t" description(item) "\n" Count++ } string NameFile = "c:/MyStuff/ModuleNames.txt" Stream Output = write(NameFile) Output <- Count "\n" stringOf(Results) close(Output) delete(Results) system ("notepad.exe " NameFile) |
|
![]() |
Telelogic DOORS
» DXL Exchange
»
Module count
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.