Script_Register

 

The "Script_Register()" function is used to register a key word for the script parser. When the script parser sees a script command that start with your key word, it will call your "Script_Parse" function to see if you can parse the command. 

 

For example, if you register the key word "edit" and the user type in the command "edit: fill 3", then the parser will call your "Script_Parse" function specifying that it find 2 arguments: "fill" and "3".

 

 

Syntax

 

extern "C" __declspec(dllexport) char  *Script_Register(

          void

)

 

 

Parameters

 

This function does not have a parameter.

 

 

Return value

 

The function returns the key word used to identify your script commands.

 

 

Remarks

 

This function is optional.

·Key word are not case sensitive and they must be unique within the first 3 characters.

·You can only register 1 key word per module.

 

 

Requirements

 

Header:

          sliceO_include.hpp

 

Library:

          sliceO_Structures.lib

 

 

Example

 

...

 

// ----------------------------------------------------------------------------

//

//          Function:          Script_Register

//

//          Parameters:          void

//          Returns:          (char *)          The name of the key word for your module

//

//          This function will tell the command line parser to look for your key

//          word.  Any command starting with this key word will be sent to you

//

// ----------------------------------------------------------------------------

extern "C" __declspec(dllexport) char *          Script_Register( void )

{

          return( "Edit" ) ;

}

 

...

 

 

See also

 

Script_Parse