Navigation:  thinBasic language > Script structure > TBMain >

APP_SetEntryPoint

Previous pageReturn to chapter overviewNext page

 

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

 

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

 

© 2004-2008 thinBasic. All rights reserved. Version 1.7.0.0 Web Site: http://www.thinbasic.com