Welcome to jBASE's new documentation site! Many answers to your questions can be found by searching the Knowledgebase or viewing the jBASE Documentation. We also have a Google Group for peer discussion about jBASE. If you are unable to find the information you are looking for, jBASE Support will be glad to assist in resolving your technical problems. Enjoy and please provide comments and feedback .

How can we help you?

COLLECTDATA

Description

The COLLECTDATA statement is used to retrieve data passed from the PASSDATA clause of an EXECUTE statement. It takes the general form:

COLLECTDATA variable

Where:

Variable is the name of the variable, which is to store the retrieved data.

Please note:

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:

FIRST

 EXECUTE "RUN JBASIC_PROGS SECOND" PASSDATA "Handover"

SECOND

 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.

Was this article helpful?