|
-
Oct 17th, 2001, 10:46 AM
#1
Thread Starter
Addicted Member
Strings
Hi all!
I have an array of strings that I'm loading in from another array of strings.
When i run the run the program in debug mode i want to check for a string that had nothing loaded into it.
when I put my cursor over the array in question with nothing loaded into it it shows
Array(3) = "(a bunch of squares)"
what I want to know is what are thoes squares and how can I test for them?
-
Oct 17th, 2001, 10:50 AM
#2
Frenzied Member
That 'bunch of squares' are unprintable characters. One way to avoid them would be to clear your array before you use it; eg;
for dummy=1 to 100
MyArray(dummy)=""
next
Also - how are unprintable characters getting into that array in the first place..? Couldn't you do something where you are storing the orginal data to ensure only 'clean' data gets in?
'Buzby'
Visual Basic Developer
"I'm moving to Theory. Everything works there."
-
Oct 17th, 2001, 10:51 AM
#3
Fanatic Member
you should be able to go
?asc(left(Array(3), 1))
and hit return in the debug window to find the ascii value.
-
Oct 17th, 2001, 10:51 AM
#4
Frenzied Member
The squares are characters that you are loading some how into the array. What you can do is pull open the immediate window. The icon is represented by a little window with a yellow exclamation point and then do the following
btw the window toolbar will appear at the bottom.
?array(3) <enter>
-
Oct 17th, 2001, 11:03 AM
#5
Thread Starter
Addicted Member
I just tried that with the immediate window and it says that ot was a 0.......strange
how it got in there the first place I don't know
the array that Im using is a dynamic array loaded in a previous form.
I guess I'll have to go back and find out why that is happening.
I mean there are suppose to be some blank entries in this array but a bunch of 0's mmmm
-
Oct 17th, 2001, 11:07 AM
#6
Frenzied Member
If i am not wrong is the memory that it is allocating for the array. That's why it displays a zero and when you place the mouse over it gives you unprintable characters. Do not quote me on this.
-
Oct 17th, 2001, 11:07 AM
#7
Thread Starter
Addicted Member
one other thing if I want to test for that, I tried
If array(3) = "00000" then
'do whatever
end if
and it didn't seem to work, is there a asc angle that I'm missing here?
-
Oct 17th, 2001, 11:08 AM
#8
Frenzied Member
Well it's not always going to be the same.
-
Oct 17th, 2001, 11:13 AM
#9
Thread Starter
Addicted Member
so maybe I'll just fix this problem from the originating point in the program
Thanks for your help!
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
|