Pro*C and Host Variable Scope
From: Jim Grotto <jim_grotto_at_deos-inc.com>
Date: 27 Jan 2002 20:44:10 -0800
Message-ID: <f3a4e8ad.0201272044.5aa8d46f_at_posting.google.com>
A quick question of the scope of Host Variables. In particular structures.
Date: 27 Jan 2002 20:44:10 -0800
Message-ID: <f3a4e8ad.0201272044.5aa8d46f_at_posting.google.com>
A quick question of the scope of Host Variables. In particular structures.
I have a structure that I typedef at the top of my C file (outside of any functions) and outside of an EXEC SQL DECLARE SECTION...
Inside several of my functions, I create instances of the structure with in an EXEC SQL DECLARE SECTION. In a few cases, I use the same variable name. Everything compiles. I don't get any duplicate definition errors, but when I run the program, the instances of the structures seem to be global. Shouldn't the variables be treated as local within a given function?
Thanks in Advance
Jim
Received on Mon Jan 28 2002 - 05:44:10 CET