Common variable unassigned in called subroutine (AREV Specific)
At 09 MAY 2000 07:44:24PM Brent wrote:
I have a calling program and a called subroutine which use the same INSERT statement to declare the same common variables. In the debugger before entering the subroutine one of these common variables has info, but in the subroutine it says it is unassigned. Any ideas?
At 09 MAY 2000 09:32PM Bill Titus wrote:
It sounds as if the two COMMON statements are not exactly the same. COMMON allocates variables in the order in which they occur. If the tested variable in the main program is in position 3 in the COMMON statement, the variable in position 3 in the subroutine's COMMON will hold that value, whatever it is called. Are the variables of the same name in the two COMMON statements also in the same positions?
At 10 MAY 2000 02:04AM Curt Putnam wrote:
Is the calling program a Main that initialized the commons? Have both programs been recompiled?
At 11 MAY 2000 12:03AM Larry Wilson - TARDIS Systems, Inc. wrote:
Most commonly, the WC_W_CNT% variable is not assigned, which would not be a problem except it's used in WC_W%(WC_W_CNT%).
However, if you are calling a subroutine from a window (and not using a program to call the window which then calls the program back as a subroutine), do you have any COMMON statements in your subroutine except for window_common% or labelled common% If so, the problem is with those additional COMMON.
tardis_systems@yahoo.com