|
-
Oct 13th, 2000, 01:20 PM
#1
i am writing a program that saves information
to a text file with a UDT that i put into an
array.
i load these items in a listbox with the array.
however, when one is deleted, a blank line is shown
in the listbox.
how can i completely remove this dead space
from my array?
thankx in advance,
larryn
-
Oct 13th, 2000, 01:29 PM
#2
Monday Morning Lunatic
Two options:
1. Create a new array, and copy the contents into it, missing out the dead one.
2. Use a Collection - they support add/remove and all the rest.
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
-
Oct 13th, 2000, 01:33 PM
#3
transcendental analytic
Or you could also check for blank items while loading the array into the listbox´.
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
Oct 13th, 2000, 01:46 PM
#4
along the lines of this?
Code:
For LBound(array) to UBbound(array)
If array(iX) = "" Then
'what here?
End If
Next
-
Oct 13th, 2000, 02:06 PM
#5
transcendental analytic
Then you would have to put another counter for reading and shuffling the array to i1.
Code:
For i1= LBound(array) to UBbound(array)
If array(i1) then exit for
Next i1
i2=i1
For i1 = i1 to UBbound(array)
If array(i1) = "" Then i2=i2+1
array(i1)=array(i2)
i2=i2+1
if i2>ubound(array) then exit for
Next
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
Oct 13th, 2000, 02:17 PM
#6
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|