Changes

Jump to navigation Jump to search
No change in size ,  15:13, 26 May 2012
m
Text replace - "{{Mono|" to "{{Code|"
|-
| width='90' | '''Signatures'''
|{{MonoCode|<b>proc:system</b>($cmd as xs:string) as xs:string}}<br/>{{MonoCode|<b>proc:system</b>($cmd as xs:string, $args as xs:string*) as xs:string}}<br/>{{MonoCode|<b>proc:system</b>($cmd as xs:string, $args as xs:string*, $encoding as xs:string) as xs:string}}
|-
| '''Summary'''
|Executes the specified command in a separate process and returns the result as string.<br/>Additional command arguments may be specified via {{MonoCode|$args}}.<br/>The result can be explicitly converted to a specified {{MonoCode|$encoding}}. If no encoding is specified, the system’s default encoding is used.
|-
|'''Errors'''
|'''[[#Errors|BXPRnnnn]]''': If the command results in an error, an XQuery error will be raised. Its code will consist of the letters {{MonoCode|BXPR}} and four digits with the command’s exit code.<br/>'''[[#Errors|BXPR9999]]''' is raised if the specified encoding does not exist or is not supported.
|-
| '''Examples'''
|
* {{MonoCode|proc:system('date')}} returns the current date on a Linux system.
* The following example returns "Command not found", if the command "xyz" cannot be located or executed:
<pre class="brush:xquery">
|-
| width='90' | '''Signatures'''
|{{MonoCode|<b>proc:execute</b>($cmd as xs:string) as element(result)}}<br/>{{MonoCode|<b>proc:execute</b>($cmd as xs:string, $args as xs:string*) as element(result)}}<br/>{{MonoCode|<b>proc:execute</b>($cmd as xs:string, $args as xs:string*, $encoding as xs:string) as element(result)}}
|-
| '''Summary'''
|Executes the specified command in a separate process and returns the result as element.<br/>Additional command arguments may be specified via {{MonoCode|$args}}.<br/>The result can be explicitly converted to a specified {{MonoCode|$encoding}}. If no encoding is specified, the system’s default encoding is used.<br/>A result has the following structure:<br/>
<pre class="brush:xml">
<result>
| '''Examples'''
|
* {{MonoCode|proc:execute('dir', '\')}} returns the root directory on a Windows system.
|}
Bureaucrats, editor, reviewer, Administrators
13,554

edits

Navigation menu