Re: array error: variable is undefined
From: Ray Costanzo [MVP] (my)
Date: 10/21/04
- Next message: Jack: "Error with formatcurrency statement"
- Previous message: Ray Costanzo [MVP]: "Re: request.forms sporadically returns no data even though the user entered data"
- In reply to: bob garbados: "Re: array error: variable is undefined"
- Next in thread: bob garbados: "Re: array error: variable is undefined"
- Reply: bob garbados: "Re: array error: variable is undefined"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 21 Oct 2004 17:26:09 -0400
Can you copy and paste the real code and the real error, which will also
include the number line as Bob suggested then? With the code that you
posted, I do not see any reason for you to get that error, as the variable
is declared with global scope.
Ray at work
"bob garbados" <bobgarbados@hotmail.com> wrote in message
news:10nga1qnf1f1c6a@corp.supernews.com...
>I freehanded the error message instead of copy/paste and goofed, the error
> does specify m_arrProducts. I inherited a bunch of ugly code and I
> totally
> spaced the include files. There is all kinds of odd stuff being done in
> the
> includes and the problem comes from one of them. Thanks for the
> direction.
>
>
> "Ray Costanzo [MVP]" <my first name at lane 34 dot commercial> wrote in
> message news:%23IPVdE7tEHA.2452@TK2MSFTNGP10.phx.gbl...
>> Notice that the error says that arrProducts is undefined, not
> m_arrProducts.
>> Are you sure that you don't have "arrProducts" typed elsewhere in the
> code?
>> Perhaps in an include file if not in this actual file?
>>
>> Ray at work
>>
>> "bob garbados" <bobgarbados@hotmail.com> wrote in message
>> news:10ng8137cb5iqcb@corp.supernews.com...
>> > Can someone point out why this is giving me the error "Variable is
>> > undefined: 'arrProducts' "
>> >
>> > <begin_code>
>> >
>> > Dim m_arrProducts()
>> >
>> > Sub SerializeCart()
>> > ReDim m_arrProducts(m_intCartCount -1)
>> > response.Write("ARRAY: " & IsArray(m_arrProducts) & " Cart Count: " &
>> > m_intCartCount)
>> > For intCounter = 0 to m_intCartCount - 1
>> > response.Write("product 1" & "<br/>")
>> > Next
>> > End Sub
>> >
>> > <end_code>
>> >
>> > the Response.Write prints "True" for IsArray and "2" for
>> > m_intCartCount.
>> >
>> >
>>
>>
>
>
- Next message: Jack: "Error with formatcurrency statement"
- Previous message: Ray Costanzo [MVP]: "Re: request.forms sporadically returns no data even though the user entered data"
- In reply to: bob garbados: "Re: array error: variable is undefined"
- Next in thread: bob garbados: "Re: array error: variable is undefined"
- Reply: bob garbados: "Re: array error: variable is undefined"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|