[Info-vax] Any Way to Pass Arrays of Strings from C to Basic?
Jonathan
jtcegh at gmail.com
Fri Nov 1 12:42:19 EDT 2019
! This solution only works up to the point where the array size
! exceeds 32767. NPARTS * STRING_LENGTH = 30000 so almost there...
!
! Note that other massaging of the strings may be needed:
! C may leave a null followed by random data in a value; these bytes
! must be changed to spaces to make BASIC happy. It also possible to
! write BASIC code that requires a value to be TRM$()'ed before passed
! to the code.
! BASIC will leave training spaces in a returned value; the first
! trailing space may need to be replaced by a null.
function long glue( C_ARRAY parts, oldest_invoices )
external sub &
get_dia_return_eligibility( string dim (), string dim () )
declare long constant &
C_STRING_LENGTH = 30, &
C_NPARTS = 1000
record C_ARRAY
string v( 0 to C_NPARTS ) = C_STRING_LENGTH ! values
end record C_ARRAY
call get_dia_return_eligibility( parts::v(), oldest_invoices::v() )
end function 1
More information about the Info-vax
mailing list