I came accross a case in legacy code where a subroutine is defined to accept 
some matrixes as parameter ei:

SUBROUTINE FOOBAR(TXT, MAT A, MAT B, MAT C, MAT D, OPTION)

One of the calling programs that makes use of this subroutine does this:

CALL FOOBAR("HELLO", "", "", "", "", "WORLD")

Instead of passing a matrix, it is passing an empty string.  

The result is that in FOOBAR, matrixes  A, B, C and D are of size zero.   In 
FOOBAR there is code that does:

MATBUILD REC.A FROM A USING CHAR(1)

Now the MATBUILD command on a matrix of size zero is giving me an undefined 
variable in a test program I wrote but in the program in production, it is 
giving me the content of a variable in the program.

I was wondering if there is a way to detect if a matrix is of size zero in 
Unibasic.   
-------
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/

Reply via email to