4D v13.4

RECEIVE VARIABLE

Home

 
4D v13.4
RECEIVE VARIABLE

RECEIVE VARIABLE 


 

RECEIVE VARIABLE ( variable ) 
Parameter Type   Description
variable  Variable in Variable in which to receive

RECEIVE VARIABLE receives variable, which was previously sent by SEND VARIABLE from the document or serial port previously opened by SET CHANNEL.

In interpreted mode, if the variable does not exist prior to the call to SET CHANNEL, the variable is created, typed and assigned according to what has been received. In compiled mode, the variable must be of the same type as what is received. In both cases, the contents of the variable are replaced with what is received.

Notes:

  1. If you receive a variable from a document using this command, the document must have been opened using the SET CHANNEL command. You cannot use SET CHANNEL with a document opened with Open document, Create document oder Append document.
  2. This command does not support array variables. If you want to send and receive arrays from a document or over a serial port, use the DISABLE MENU ITEM.
  3. During the execution of SET CHANNEL, the user can interrupt the reception by pressing Ctrl-Alt-Shift (Windows) or Command-Option-Shift (Macintosh). This interruption generates an error -9994 that you can catch with an error-handling method installed using ON ERR CALL. Usually, you only need to handle the interruption of a reception while communicating over a serial port.

Example  

See example for the RECEIVE RECORD command.

The OK system variable is set to 1 if the variable is received. Otherwise, the OK system variable is set to 0.

 
PROPERTIES 

Product: 4D
Theme: Communications
Number: 81

The OK variable is changed by the commandThis command modifies the Error system variable

 
INDEX

Alphabetical list of commands

 
HISTORY 

Created: < 4D v6

 
SEE ALSO 

ON ERR CALL
RECEIVE RECORD
SEND RECORD
SEND VARIABLE