Go Back

User login

Frontpage Sponsor


Google search

For ERP LN feature pack upgrade, what method of install are you using?
Installation Wizard into existing VRC
Installation Wizard into new VRC
Manual into existing VRC
Manual into new VRC
Total votes: 49

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


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().


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

Related topics

No votes yet

All times are GMT +2. The time now is 05:29.

©2001-2018 - -