Baanboard.com

Go Back   Baanboard.com

User login

Frontpage Sponsor

Main

Poll
For ERP LN feature pack upgrade, what method of install are you using?
Installation Wizard into existing VRC
38%
Installation Wizard into new VRC
41%
Manual into existing VRC
3%
Manual into new VRC
19%
Total votes: 37

Baanboard at LinkedIn


Reference Content

 
External variables
By patvdv at 26 Feb 2008 - 21:56

External variables

An external variable is declared outside the function blocks. You can use them in all functions that occur after the variable declaration, and also in other programs (for example, forms, reports, and runtime expressions). It is possible to declare external variables within a function block but this is not recommended.

If a local variable has the same name as an external variable, the local variable is used within the function. The external variable is not affected.

Declaration, initialization, and scope

Point of declaration

Outside the functions. (Or within a function, but this is not recommended.)

Syntax of declaration

extern <type> name

Initialization

At program start:

numeric set to 0

strings ""

Scope (validity and time)

Valid anywhere in the source, throughout the execution. Also valid outside the program. For example, on forms/reports, in runtime expressions, and by way of import() and export().

Example

 extern long   i
 function void test()
 {
    i = 10        | This is the external variable
 }

Related topics



0
No votes yet


All times are GMT +2. The time now is 19:36.


©2001-2017 - Baanboard.com - Baanforums.com