SHELLHIDE: Difference between revisions
Jump to navigation
Jump to search
Navigation:
Main Page with Articles and Tutorials
Keyword Reference - Alphabetical
Keyword Reference - By usage
Report a broken link
(Created page with "{{DISPLAYTITLE:_SHELLHIDE}} The _SHELLHIDE function hides the console window and returns any INTEGER code sent when a program exits. {{PageSyntax}} : {{Parameter|returnCode%}} = _SHELLHIDE({{Parameter|externalCommand$}}) {{Parameters}} * The literal or variable STRING {{Parameter|externalCommand$}} parameter can be any external command or call to another program. {{PageDescription}} * A QB64 program can return codes specified after END or SYST...") |
No edit summary |
||
(One intermediate revision by the same user not shown) | |||
Line 7: | Line 7: | ||
{{ | {{PageParameters}} | ||
* The literal or variable [[STRING]] {{Parameter|externalCommand$}} parameter can be any external command or call to another program. | * The literal or variable [[STRING]] {{Parameter|externalCommand$}} parameter can be any external command or call to another program. | ||
Line 18: | Line 18: | ||
{{PageExamples}} | {{PageExamples}} | ||
''Example:'' Shelling to another QB64 program will return the exit code when one is set in the program that is run. | ''Example:'' Shelling to another QB64 program will return the exit code when one is set in the program that is run. | ||
{{CodeStart}} | {{CodeStart}} | ||
returncode% = {{Cl|_SHELLHIDE}}("DesktopSize") 'replace call with your program EXE | returncode% = {{Cl|_SHELLHIDE}}("DesktopSize") 'replace call with your program EXE | ||
{{Cl|PRINT}} returncode% | {{Cl|PRINT}} returncode% | ||
{{Cl|END}} | {{Cl|END}} | ||
{{CodeEnd}} | {{CodeEnd}} | ||
: ''Explanation:'' To set a program exit code use an [[INTEGER]] parameter value after [[END]] or [[SYSTEM]] in the called program. | : ''Explanation:'' To set a program exit code use an [[INTEGER]] parameter value after [[END]] or [[SYSTEM]] in the called program. | ||
Latest revision as of 02:23, 24 January 2023
The _SHELLHIDE function hides the console window and returns any INTEGER code sent when a program exits.
Syntax
- returnCode% = _SHELLHIDE(externalCommand$)
Parameters
- The literal or variable STRING externalCommand$ parameter can be any external command or call to another program.
Description
- A QB64 program can return codes specified after END or SYSTEM calls.
- The returnCode% is usually 0 when the external program ends with no errors.
Examples
Example: Shelling to another QB64 program will return the exit code when one is set in the program that is run.
returncode% = _SHELLHIDE("DesktopSize") 'replace call with your program EXE PRINT returncode% END |
- Explanation: To set a program exit code use an INTEGER parameter value after END or SYSTEM in the called program.
See also