Difference between revisions of "EXEC()"

From Lianjapedia
Jump to: navigation, search
m (1 revision)
Line 1: Line 1:
 
==Purpose==
 
==Purpose==
 
Function to execute a list of commands
 
Function to execute a list of commands
 
  
 
==Syntax==
 
==Syntax==
EXEC(<expC1> [,<expC2>...])
+
EXEC(<expC1> [, <expC2> ...])
 
+
  
 
==See Also==
 
==See Also==
Line 11: Line 9:
  
 
==Description==
 
==Description==
The EXEC() function executes a list of commands.  Each command is specified by <expC1>, <expC2>, and so on.  This function is useful for consolidating command lines in UDCs (User Defined Commands) which have been defined with the ALIAS command.  The EXEC() function returns a logical true (.T.) if all the specified commands execute without error, or a logical false (.F.) if an error occurs.
+
The EXEC() function executes a list of commands.  Each command is specified by <expC1>, <expC2>, and so on.  The EXEC() function returns a logical true (.T.) if all the specified commands execute without error, or a logical false (.F.) if an error occurs.
 
+
  
 
==Example==
 
==Example==
 
<code lang="recital">
 
<code lang="recital">
alias lf;
+
? exec("open database southwind","use example","browse")
"iif(run('ls –l %1 > run.tmp') = 0,;
+
exec('textedit([run.tmp],0,0,20,79,.f.,[FILE LISTING])','erase run.tmp'), .F.)"
+
 
+
lf
+
 
</code>
 
</code>
  
 
==Products==
 
Recital Server, Recital
 
 
[[Category:Documentation]]
 
[[Category:Documentation]]
 
[[Category:Functions]]
 
[[Category:Functions]]

Revision as of 11:14, 12 December 2012

Purpose

Function to execute a list of commands

Syntax

EXEC(<expC1> [, <expC2> ...])

See Also

ALIAS, DO, EXECSCRIPT(), KEYWORD, RUN, RUN(), SPAWN,

Description

The EXEC() function executes a list of commands. Each command is specified by <expC1>, <expC2>, and so on. The EXEC() function returns a logical true (.T.) if all the specified commands execute without error, or a logical false (.F.) if an error occurs.

Example

? exec("open database southwind","use example","browse")