I guess I've been staring at this for too long...
The error referring to m_arrProducts was my fault and I created it trying to
fix the error referring to arrProducts, so you were right the first time
with both suggestions Ray. arrProducts was used in an include file and not
declared.
My parachute for having difficulty here is the code I'm working on was
poorly written and the application has no documentation so I'm still getting
a grasp on the pieces of the puzzle. It was someone's first forray into asp
and it goes to show that a solid design with a little bit of documentation
goes a long way.
"Ray Costanzo [MVP]" <my first name at lane 34 dot commercial> wrote in
message news:%2****************@TK2MSFTNGP15.phx.gbl...
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" <bo*********@hotmail.com> wrote in message
news:10*************@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:%2****************@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" <bo*********@hotmail.com> wrote in message
news:10*************@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.
>
>