Try OpenEdge Now
skip to main content
Programming Interfaces
External Program Interfaces : Using COM Objects in ABL : Accessing COM object properties and methods : Restrictions on property and method references : Named method parameters
 
Named method parameters
The COM standard allows named method parameters that you can specify in any order for a method call. ABL does not support named parameters in any form. The first line of this example shows an illegal named parameter, where the Filename parameter is passed to the SaveAs method on an Excel Workbook handle:
Excel-Workbook-hdl:SaveAs(Filename = "x.xls"). /* Illegal syntax */
Excel-Workbook-hdl:SaveAs("x.xls"). /* Legal syntax */
The second line shows the form that ABL accepts. In general, whether or not you omit optional parameters, you must pass all method parameters in the correct parenthesized order.