4D v15

PROCESS 4D TAGS

Home

 
4D v15
PROCESS 4D TAGS

PROCESS 4D TAGS  


 

 

PROCESS 4D TAGS ( inputTemplate; outputResults{;param1;...;paramN}

ParameterTypeDescription
inputTemplateText, BLOB->Data containing tags to process
outputResultsText, BLOB<-Results of executed template
param1...NText, Date, Time, number, pointer->Parameter(s) to pass to template in execution

Originally introduced in 4D v14 R4

Theme: Tools

The PROCESS 4D TAGS command now supports the insertion of parameters into the template being executed.

PROCESS 4D TAGS accepts an undefined number of additional param parameters. Just like for project methods, parameters can be scalar values of any type (text, date, time, longint, real, etc.). You can also use arrays by passing array pointers.

Within the template processed by 4D tags, these parameters are available through regular $1, $2, etc. arguments, like for 4D methods (see example).

A dedicated set of local variables is now defined for the PROCESS 4D TAGS in its execution context and can be read and set throughout the processing.

Compatibility note: In previous versions of 4D, local variables defined in the calling context could be accessed in the PROCESS 4D TAGS execution context in interpreted mode. This is no longer the case.

Note: A new 4DEval tag is also added in 4D, and the 4DLOOP tag now accepts pointers. For more information, please refer to the 4D transformation tags section.

Example  

 ARRAY TEXT($array;2)
 $array{1}:="hello"
 $array{2}:="world"
 $input:="<!--#4DEVAL $1-->"
 $input:=$input+"<!--#4DLOOP $2-->"
 $input:=$input+"<!--#4DEVAL $2->{$2->}--> "
 $input:=$input+"<!--#4DENDLOOP-->"
 PROCESS 4D TAGS($input;$output;"elements = ";->$array)
  // $output = "elements = hello world"

 
PROPERTIES 

Product: 4D
Theme: Language

 
HISTORY 

 
ARTICLE USAGE

4D v15 - Upgrade (standard edition) ( 4D v15)