msvisual.com Forum Index
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Array problems

 
Post new topic   Reply to topic    msvisual.com Forum Index -> VB Syntax
Author Message
Joachim



Joined: 04 Oct 2007
Posts: 21

PostPosted: Wed Jul 26, 2006 9:15 am    Post subject: Array problems Reply with quote

I have an array and the following code:

Private g_unsuccessfulSendIndices() As Integer

Private Sub SomeSub()
ReDim g_unsuccessfulSendIndices(0)
Dim l_bool As Boolean
l_bool = Not g_unsuccessfulSendIndices 'Here, l_bool becomes True
ReDim g_unsuccessfulSendIndices(0)
l_bool = Not g_unsuccessfulSendIndices 'But here, l_bool becomes
False - what is the difference?

Archived from group: microsoft>public>vb>syntax
Back to top
View user's profile Send private message
Joachim



Joined: 04 Oct 2007
Posts: 21

PostPosted: Wed Jul 26, 2006 9:18 am    Post subject: RE: Array problems Reply with quote

My mistake - it is too hot today

"Joachim" wrote:

> I have an array and the following code:
>
> Private g_unsuccessfulSendIndices() As Integer
>
> Private Sub SomeSub()
> ReDim g_unsuccessfulSendIndices(0)
> Dim l_bool As Boolean
> l_bool = Not g_unsuccessfulSendIndices 'Here, l_bool becomes True
> ReDim g_unsuccessfulSendIndices(0)
> l_bool = Not g_unsuccessfulSendIndices 'But here, l_bool becomes
> False - what is the difference?
>
Back to top
View user's profile Send private message
Alcedes



Joined: 04 Oct 2007
Posts: 2

PostPosted: Fri Jul 28, 2006 10:17 pm    Post subject: Re: Array problems Reply with quote

Code works perfectly for me...I used this:

Private Sub Form_Load()
ReDim g_unsuccessfulSendIndices(0)
Dim l_bool As Boolean
l_bool = Not g_unsuccessfulSendIndices 'Here, l_bool becomes True
ReDim g_unsuccessfulSendIndices(0)
l_bool = Not g_unsuccessfulSendIndices 'But here, l_bool becomes
End Sub
'false - what is the difference?



Joachim wrote:
>I have an array and the following code:
>
>Private g_unsuccessfulSendIndices() As Integer
>
>Private Sub SomeSub()
> ReDim g_unsuccessfulSendIndices(0)
> Dim l_bool As Boolean
> l_bool = Not g_unsuccessfulSendIndices 'Here, l_bool becomes True
> ReDim g_unsuccessfulSendIndices(0)
> l_bool = Not g_unsuccessfulSendIndices 'But here, l_bool becomes
>False - what is the difference?

Back to top
View user's profile Send private message
Display posts from previous:   
Related Topics:
Can't Assign Array to Variant in Array Hi, I want to assign an array to another array's element like: Dim ar1(2) Dim ar2$(2) ar1(0)=2 ar1(1)=ar2 ' *** But I get a Type Mismatch error for the last line of code. Can someone please enlighten me on how to perform

Problems with collections Hi there, I have a problem. I am unable to access a collection item by its key. I have always tried to do this, but never could, and now I REALLY REALLY need to be able to do it. Here is my code, please help: 'Fields is a collection item

dateformat problems is there a function to get the format of the system date? Can you change it in the code (the alternative : how do I set a date to the first of a certain month without having to think about the for example: Receiveddate

Guestbook problems On my homepage I have a guestbook. Just before christmas someone wrote a message in my guestbook. My guestbook pretty much look like this page when you post a new message. So what happend is that the message added in my guestbook ended with ¤¤¤. Normally

Problems with the Rnd() function Hi, I want to generate a number between 41 and 71. To do this I use the following syntax: Randomize() CInt(Int((71 * Rnd()) + 41)) I wrote the following function just to test this: Private Sub TestRnd() Randomize() Dim i As Int32 = 0 Do While i < 50 Conso
Post new topic   Reply to topic    msvisual.com Forum Index -> VB Syntax All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group