DYNAMIC ARRAY
Iwan AB <[email protected]> Thu, 8 Jul 2021 13:45:38 +0700
| Newsgroups | gmane.comp.lang.4gl.aubit.general |
|---|---|
| Message-ID | <CAHJCSm+xXbeqriqPVtB_+BaFFW+Bz+JKUShe1nFHnJPVBdVNUA@mail.gmail.com> |
Hi,
I found quite interesting that in Aubit4GL, dynamic array can be used with
INPUT ARRAY or DISPLAY ARRAY statements -- excellent!!, contrary to
Informix-4GL (I used I-4GL 7.32), as stated in reference manual that
dynamic array cannot be used with INPUT ARRAY or DISPLAY ARRAY statements.
But, in Informix-4GL, dynamic array can be passed to or returned from
functions. I tested in Aubit4GL, it's said that passing dynamic array to a
function is not implented yet.
Assertion failed: passing dynamic arrays is not implemented yet
(File:dynmem.c Line:178)
Err:Program pa.4ge stopped at 'pa.4gl', line number 5.
Error status number -30289.
Assertion failed.
I try using COPYOF
MAIN
DEFINE a DYNAMIC ARRAY OF CHAR(1)
ALLOCATE ARRAY a[1]
LET a[1] = "A"
#CALL p1(a)
CALL p2(COPYOF(a))
END MAIN
{
FUNCTION p1(b)
DEFINE b DYNAMIC ARRAY OF CHAR(1)
DISPLAY b[1]
END FUNCTION
}
FUNCTION p2(COPYOF b)
DEFINE b DYNAMIC ARRAY OF CHAR(1)
DISPLAY b[1]
END FUNCTION
it came up with the following errot at runtime
4gl function call stack :
MAIN
Err:Program pa.4ge stopped at 'pa.4gl', line number 16.
Error status number -30284.
Invalid conversion.
4gl function call stack :
pa.4gl (Line 6) calls p2(b=Not printable)
MAIN
Regards,
Iwan
<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
Virus-free.
www.avast.com
<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
_______________________________________________
Aubit4gl-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/aubit4gl-discuss