lang::util::convert_percentage_signs_to_adp_variables (private)

 lang::util::convert_percentage_signs_to_adp_variables text

Defined in packages/acs-lang/tcl/lang-util-procs.tcl

Convert percentage_signs message vars to adp var syntax.

Parameters:
text
Author:
Peter Marklund
See Also:

Partial Call Graph (max 5 caller/called nodes):
%3 test_util__convert_adp_variables_to_percentage_signs util__convert_adp_variables_to_percentage_signs (test acs-lang) lang::util::convert_percentage_signs_to_adp_variables lang::util::convert_percentage_signs_to_adp_variables test_util__convert_adp_variables_to_percentage_signs->lang::util::convert_percentage_signs_to_adp_variables template::adp_array_variable_regexp template::adp_array_variable_regexp (public) lang::util::convert_percentage_signs_to_adp_variables->template::adp_array_variable_regexp template::adp_array_variable_regexp_noquote template::adp_array_variable_regexp_noquote (public) lang::util::convert_percentage_signs_to_adp_variables->template::adp_array_variable_regexp_noquote template::adp_variable_regexp template::adp_variable_regexp (public) lang::util::convert_percentage_signs_to_adp_variables->template::adp_variable_regexp template::adp_variable_regexp_noquote template::adp_variable_regexp_noquote (public) lang::util::convert_percentage_signs_to_adp_variables->template::adp_variable_regexp_noquote

Testcases:
util__convert_adp_variables_to_percentage_signs
Source code:
    # substitute array variable references
    # loop to handle the case of adjacent variable references, like @a@@b@
    regsub -all {@} [template::adp_array_variable_regexp] {%} pattern
    while {[regsub -all $pattern $text {\1@\2.\3@} text]} {}
    regsub -all {@} [template::adp_array_variable_regexp_noquote] {%} pattern
    while {[regsub -all $pattern $text {\1@\2.\3;noquote@} text]} {}

    # substitute simple variable references
    regsub -all {@} [template::adp_variable_regexp] {%} pattern
    while {[regsub -all $pattern $text {\1@\2@} text]} {}
    regsub -all {@} [template::adp_variable_regexp_noquote] {%} pattern
    while {[regsub -all $pattern $text {\1@\2;noquote@} text]} {}

    return $text
XQL Not present:
PostgreSQL, Oracle
Generic XQL file:
packages/acs-lang/tcl/lang-util-procs.xql

[ hide source ] | [ make this the default ]
Show another procedure: