Navigation:  ThinBASIC Modules > Core (thinBasic Core Engine) > Application functions >

APP_SetReturnCode

Previous pageReturn to chapter overviewNext page

 

Description

 

Set the process return code

 

Syntax

 

lret = APP_SetReturnCode (ReturnCode)

 

Returns

 

Numeric

 

Parameters

 

Name

Type

Optional

Meaning

ReturnCode

Numeric

No

A positive number in the range 0 to 2147483647 (2^31 -1)

 

Remarks

 

This is particularly useful when thinBasic application needs to return a code to the operating system shell and pass it to the next or calling process.

 

Restrictions

 

Attention:

in case a thinBasic script contains a TBMain (or equivalent) main function, APP_SetReturnCode will have no effect.

In this case value returned by TBMain will be considered as application return code.

 

See also

 

Examples