6. Creating an Application with OpenAPI : Sample Code : How the Synchronous Sample Code Works : main() Function
 
Share this page                  
main() Function
The main() function at the beginning of the source file usually contains the specific aspect being demonstrated. OpenAPI function calls that support the demonstration, such as connection or transaction management, are at the end of the file. Sometimes, when the demonstration calls for multiple executions of an OpenAPI function, you can place the OpenAPI function call in its own function following main().