APP_SetEntryPoint

<< Click to Display Table of Contents >>

Navigation:  ThinBASIC Core Language > Script structure > TBMain >

APP_SetEntryPoint

 

Description

 

Set the main script function name.

 

Syntax

 

n = APP_SetEntryPoint(NewMainFunction)

 

Returns

 

Number.

%TRUE means function name was found and set as main script function name

 

Parameters

 

Name

Type

Optional

Meaning

NewMainFunction

String or function

Yes

Function name can be indicated in 2 different ways:

1.an existing function name

2.a string expression representing the name of an existing function name

 

 

Remarks

 

thinBasic main script function is usually called TBMain. With APP_SetEntryPoint programmer can change this behave and indicate a different name as main function.

 

Restrictions

 

See also

 

Examples

 

'---To specify a function name, the following syntax are both valid

'---1. a direct name

APP_SetEntryPoint MyNewMain

 

'---2. a string expression valuating to a valid function name

APP_SetEntryPoint "My" & "New" & "Main"

 

 

'--------------------------------------------

Function MyNewMain() As Long

'--------------------------------------------

  '--- do something

End Function