Syncopation Software

DPL 9 Help

Poke Function (DPL Code)

Poke Function (DPL Code)

This command is used to send data to the server application. The syntax is

poke(channel,item,data)

channel - A number identifying the channel.

item - A named or literal string constant identifying the data item to be set.

data - May be either a variable expression or a string constant. If it is a variable expression, it will be evaluated and converted to a character string representing the value of the expression. If it is a named or literal string constant, it will be sent without conversion. All responses will be sent in clipboard CF_TEXT format (ASCII text).

The function returns the number 0.

If both the channel argument and the data argument of the poke function are constant expressions, the function will be executed at compile time; otherwise, the function will be executed each time the containing expression is evaluated and either argument has assumed a new value.

The use of this function in a DPL program will disable the Fast Sequence Evaluation option during all runs. Whenever this function is executed, all execute and request functions in the program that were not evaluated as constant expressions during compilation will be marked for reexecution.

This example puts a number in a cell:

poke(channel_1,"z",tax_rate * income)

This example puts a string in a cell:

poke(channel_1,"day","Monday")

This example puts a new formula in a cell:

poke(channel_1,"sum"," = x + y")

Versions: DPL Professional, DPL Enterprise, DPL Portfolio

See Also