Stand-alone function parts support migration from languages that do not use libraries.
package com.CompanyB.CustomerPackage;
// stand-alone function--outside program
function printBalance (pBal DECIMAL(7,2) in)
writeStdOut (strLib.formatNumber(pBal));
end
program BalanceCheck type BasicProgram {
includeReferencedFunctions = YES // without this property
} // cannot find printBalance()
customer INT = 1;
balance DECIMAL(7,2) = 0;
function main()
while (balance >= 0)
balance = getCustomerBalance(customer); // returns -1
printBalance (balance);
end // while
end // main
function getCustomerBalance (custNo INT in) returns (DECIMAL(7,2))
...
end // function
end // program
| Platform | Issue |
|---|---|
| VisualAge® Generator compatibility mode | The containerContextDependent property provides functionality that was available in VisualAge Generator with regard to resolving references from stand-alone functions; all references to functions and parts are resolved as if the function were embedded within the logic part that invokes it. See “containerContextDependent.” |