CHAIN


Temporarily transfers control to an external program

Syntax:
declare function Chain ( byref program as const string ) as long

Usage:
result = Chain( program )

Parameters:
program
The file name (including file path) of the program (executable) to transfer control to.

Return Value:
Returns the external program's exit code if executed successfully, or negative one (-1) otherwise.

Description:
Transfers control over to an external program. When the program exits, execution resumes immediately after the call to Chain.

Examples:
#ifdef __FB_LINUX__
    Dim As String program = "./program"
#else
    Dim As String program = "program.exe"
#endif

Print "Running " & program & "..."
If (Chain(program) <> 0) Then
    Print program & " not found!"
End If


Platform Differences:
Differences from QB:
See also:
Back to Operating System Functions
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki



sf.net phatcode