PRIVATE statement doesn't work as expected in 5.605 (or 5.42 either, for that matter)

I'm adding a module to a very large program (> 5000 lines), and I wanted to make some of the variables PRIVATE to that module. Two problems: apparently one can't declare a matrix PRIVATE (as one can in a SHARE statement) -- trying to do so generates an error message when I try to BIND the program. The second problem: when I declare an ordinary variable PRIVATE in the module header, I can't use it in a subroutine within the module -- this also generates an error message ("can't use this statement here").


PRIVATE statement


The PRIVATE statement can only be used for functions, sub-routines and picture routines. It cannot be used for variables or matrices - hence the error message - statement cannot be used here.

You should probably be using the LOCAL statement which essentially makes variables, arrays etc "private" in relation to the routine containing the LOCAL statement.

Big John

Private statement

Thanks for clarifying this.

best regards,