[Coco] new problem with unpack

Wayne Campbell asa.rand at gmail.com
Fri Nov 1 18:53:11 EDT 2013


OK, I've been thinking. How about this. Basic09 does not care about the
structural layout of the data being passed. Size is what it is looking for.
I can convert the records and variables I am passing to a procedure to a
STRING variable the same size as the records. Maybe each record is a
separate string, to be clear.

I will demonstrate:

TYPE REGS=cc,a,b,dp:BYTE; x,y,u:INTEGER
DIM reg:REGS
DIM reg$:STRING[10]

reg$:=regs

extProcName:="ex RunB #32K forkedProcedureName ("""+reg$+""")"
SHELL extProcName

After returning:

reg:=reg$

The receiving procedure, forkedProcedureName, may be written as follows:

PROCEDURE forkedProcedureName
TYPE REGS=cc,a,b,dp:BYTE; x,y,u:INTEGER

.
.
.

PARAM reg:REGS

According to the manual, this is valid and will work. I have not tried it
out before, but I guess now is as good a time as any to give it a go.

I will post when I have something to report.

Wayne



More information about the Coco mailing list