ui.Interface.writeToPipe()

 

ui.Interface.writeToPipe() is used for writing data to the necessary pipe on the client side.

 

Syntax:

 

ui.Interface.writeToPipe("<pipe_name>", "data")

 

Parameters:

 

pipe_name

name of the pipe (STRING)

data

data which is sent to the client side and written to the specified pipe

 

Usage and examples:

 

ui.Interface.writeToPipe() sends data to the client side and writes it to the specified path:

 

MAIN

  CALL ui.Interface.writeToPipe("print", "test")

  CALL fgl_getkey()

END MAIN

 

This program will print the string "test" on printer.

 

ui.Interface.writeToPipe() can take a variable of the STRING data type as its second argument:

 

MAIN

DEFINE a STRING

  LET a = "test"

  CALL ui.Interface.writeToPipe("print", a)

  CALL fgl_getkey()

END MAIN

 

This program does the same as the previous one - prints the string "test" on printer.