Name

progn — Calculates all given expressions and returns the result produced by the last one.

Synopsis

any progn ( expn1 any ,
expn2 any ,
... ,
expnN any );

Description

This function calculates its first argument, then second argument and so on. The results of these calculations are not used, except the result of the last expression which is returned. The only useful application for this function is calling XPath extension functions for side effects.

This function is not a part of library of standard XQuery 1.0 functions.

Parameters

expn1, expn2, ... expnN

Expressions to be calculated.

Return Types

Any (according to the type of expnN )

Examples

Example24.614.

[xmlns:fileio='http://www.example.com/file-io']
if (function-available ('fileio:printf'),
  progn (
    fileio:open('greeting.txt', 'wt'),
    fileio:printf('Hello %s', /userinfo/name),
    fileio:close(),
    'File greeting.txt saved' ),
  'File greeting.txt not saved' ) )


See Also

if

for

let