-
Notifications
You must be signed in to change notification settings - Fork 10
Export
boxgaming edited this page Sep 25, 2023
·
2 revisions
Specifies the Function(s), Sub(s) and/or Const(s) which will be accessible to programs importing the module.
Export sourceItem [As externalAlias]
- The sourceItem specifies the name of the Functions, Subs or Const to export for use by the calling program.
- The optional externalAlias specifies an alternate name for the exported item. If not specified the internal name will be used.
- Multiple comma-separated source items can be specified per Export line.
Example 1: Export methods from a sample user-defined math library.
Export increment As Plus1
Export factorial AS Factorial
Function increment (num)
increment = num + 1
End Function
Function factorial (num)
Dim res
$If Javascript Then
if (num === 0 || num === 1) {
num = 1;
}
else {
for (var i = num - 1; i >= 1; i--) {
num *= i;
}
}
$End If
factorial = num
End Function