diff --git a/_build/reference/1443-system-exec.markdown b/_build/reference/1443-system-exec.markdown index ba4e4bb4..cd1a9996 100644 --- a/_build/reference/1443-system-exec.markdown +++ b/_build/reference/1443-system-exec.markdown @@ -1,11 +1,13 @@ # EXEC -> EXEC file +> EXEC (file) -Transfers control to another operating system program. Control returns to the .bas immediately and the system command is executed parallel and independent to SmallBASIC. File name is case sensitive in Linux. +Transfers control to the program `file`. Control returns to the calling bas-file immediately and the program is executed parallel and independent to SmallBASIC. File name is case sensitive in Linux. Enclose the string `file` with quotation marks to start a program with parameters. See `run` for starting an external program and wait until program finished execution. +### Example 1 + ``` ' Select your editor for testing exec "kate" ' Editor KDE @@ -15,3 +17,9 @@ exec "kate" ' Editor KDE print "This line will be printed immediately without delay" ``` +### Example 2: Execute with parameters + +``` +' Call shutdown in Linux +exec(enclose("shutdown -h now")) +```