Google Search diml.org
[ french ]

Table des matières
 Latest News
 An application of the  WCT_NEWS  component
>> Top of page

Language Reference

set Statement


Module : Core Group : Variable declaration

Syntax 1

<%set variable-name = "escaped_string_expression" %>

Syntax 2

<%set variable-name = variable_name %>

The set statement allows defining an extra variable/template when parsed. the DIML entry that is generated shares the same dataspace and has is semantically the same as if it were declared as a template, but will only exist from the statement execution time on.

The first syntax affects a textual string in which DIML calls can be embedded in an escaped form (HTML tags could be either). Characters < and > must appear as their respective SGML entities (resp. &lt; and &gt;.

The second syntax is provided to transfer an existing variable to another, just as other programming languages do with the "affectation" operator.

In case the target variable already exists (from a template declaration or an older "set" invocation), the old content of the variable is lost.

See also the eval statement.


previous summary next


All material is copyleft V.G. FREMAUX (EISTI France) 1999 to 2003 except explicitly mentioned