|
This command is used in User Defined Functions (UDF) and Expressions items (Calculation part). Forces a variable to become external. Usually a variable becomes external implicitly when in the code its value is read before any assignment to it. Additionally in case of UDF is the only way to declare array, automation object, File, Form, Buffer, Class or function parameters. E.g.
The above code creates five external variables, v1, v2, v3, tbl, o and FuncParam. The fourth is an array variable. The arr before tbl denotes that this variable is an array. The fifth is an automation object variable. The obj before o denotes that this variable is an object. The last is a function parameter with the interface of three a1, a2, a3 simple parameters. The parentheses is the way to distinguish such a kind of parameter. External Array, Automation object, Buffer, File, Form, Class or Function parameters can be created only in UDFs. We can have many extern commands in our code in any place but makes more sense to put EXTERN at the start of our code. See also INTERN |