Updated: 10/14/2021, 2:20:00 PM
Created: 10/14/2021, 2:20:00 PM
Last Updated By: mikes
Read Time: 1 minute(s)
The COLLECTDATA statement is used to retrieve data passed from the PASSDATA clause of an EXECUTE statement. It takes the general form:
variable is the location in which to store the retrieved data.
The COLLECTDATA statement can be used in any program, which is EXECUTEd (or PERFORMed) by another program where the calling program uses a PASSDATA clause.
The EXECUTEd program uses a COLLECTDATA statement to retrieve the passed data.
If a PASSDATA clause is not in effect, variable will be assigned a value of null.
An example of use is as:
EXECUTE "RUN JBASIC_PROGS SECOND" PASSDATA "Handover"
COLLECTDATA PassedMessage CRT PassedMessage
In the above example, program FIRST will EXECUTE program SECOND and will pass the string "Handover" in the PASSDATA clause. Program SECOND retrieves the string to a variable PassedMessage and prints the string on the Terminal screen.
Go back to jBASE BASIC
Go back to Programmers' Reference Guide