( parameter , parameter )
Note: Use the following syntax to define each parameter, which can be a primitive, array, class, interface, temp-table, ProDataSet, or buffer:
BUFFER buffer-name FOR database-table-name PRESELECTINPUT OUTPUT INPUT-OUTPUTAS primitive-type-nameSpecifies a built-in primitive type for the parameter you are defining. The built-in data type (primitive-type-name) can be one of the following:
CHARACTER COM-HANDLE DATE DATETIME DATETIME-TZ DECIMALHANDLE INT64 INTEGER LOGICAL LONGCHAR MEMPTR RAW RECIDAS-data-typeROWIDIf you are defining a parameter for a user-defined function, a pure ABL class method (without reference to .NET), or a class event defined with an ABL method signature, AS-data-type does not specify a valid primitive type name.If you are defining a parameter for a method that overrides a .NET super class method (abstract or otherwise) or implements a method defined in a .NET interface, primitive-type-name must specify the exact .NET data type of the corresponding parameter in the overridden or implemented method. For a .NET mapped data type that is a default match for a given ABL primitive type, you must use the default matching ABL data type, as shown in Table 24. (For example, INTEGER indicates a .NET System.Int32.) For a .NET mapped data type that is not a default match for one of the ABL primitive types, ABL provides a data type keyword (AS-data-type) that you must use to explicitly indicate the required .NET data type, as shown in Table 25. (For example, the AS data type, UNSIGNED-BYTE, indicates a .NET System.Byte.)
Note: At run time, a method parameter defined using an AS-data-type keyword behaves in ABL like the corresponding ABL primitive type shown in Table 25. (For example, an UNSIGNED-BYTE behaves like an INTEGER.)Also note that when overriding or implementing a .NET array parameter, you must specify the .NET array object type (for example, "System.Int32[]" or "System.Byte[]"); you cannot use an ABL array equivalent (for example, INTEGER EXTENT or UNSIGNED-BYTE EXTENT).AS CLASS object-type-nameSpecifies the type name of an ABL or .NET class or interface. Specify an object type name using the syntax described in the Type-name syntax reference entry. With an appropriate USING statement, you can also specify a class or interface name alone, without the qualifying package or namespace.You cannot directly specify the type name of a .NET mapped object type (such as System.Int32). To define a parameter that matches a .NET mapped type, you must define it as the corresponding ABL primitive type (primitive-type-name).If you are defining a parameter for a method that overrides a .NET super class method (abstract or otherwise) or implements a method defined in a .NET interface, object-type-name must specify the exact .NET object type of the corresponding parameter in the overridden or implemented method. However, for .NET inner (nested) type, note the difference in the ABL syntax, which replaces the corresponding period (.) in the .NET object type with a plus (+) (see the Type-name syntax reference entry).Also note that when overriding or implementing a .NET array parameter, you must specify the .NET array object type (for example, "System.Drawing.Point[]"); you cannot use an ABL array equivalent (such as System.Drawing.Point EXTENT).For a class or interface return value, the AVM passes an object reference associated with the class or interface, not a class instance itself. For more information on object references, see the Class-based object reference reference entry.LIKE fieldThe parameter will take on the characteristics of field. These characteristics include data type, extent, label, column-label, format, decimals, view-as and case sensitivity. One exception is UNDO, since all method and function parameters are always NO-UNDO.You can override the extent of field by supplying your own EXTENT phrase. You cannot override any other characteristics because the only variable qualifier available in the parameter definition syntax is EXTENT.If field is a variable or temp-table field, then it must be known by the compiler before the user-defined function, a class method, or class event you are defining can be compiled.If field is a database field, then the database must be connected at compile time, but need not be connected at run time. You may optionally qualify a database field name with its database and/or table name.EXTENT constantDefines the parameter as an array of data elements with a primitive type (specified using the AS primitive-type-name option) or an object type (specified using the AS object-type-name option). This option can specify an array parameter as either determinate (has a defined number of elements) or indeterminate (has an undefined number of elements). To define a determinate array parameter, specify the EXTENT option with the constant argument. This optional argument is an integer value that represents the number of data elements in the array parameter. To define an indeterminate array parameter, specify the EXTENT option without the constant argument.The EXTENT is part of the parameter data type. For more information, see the Type-name syntax reference entry.If you are using the AS option without the EXTENT option, or you specify constant as 0, the parameter is not an array parameter.TABLE temp-table-nameFor more information about passing a temp-table parameter by reference or by binding, see the Parameter passing syntax reference entry. For more information about temp-table parameters, see OpenEdge Getting Started: ABL Essentials.TABLE-HANDLE temp-table-handleDATASET dataset-nameFor more information about passing a ProDataSet object parameter by reference or by binding, see the Parameter passing syntax reference entry. For more information about ProDataSet object parameters, see OpenEdge Development: ProDataSets.DATASET-HANDLE dataset-handleFor more information about passing these parameters by binding, see the Parameter passing syntax reference entry.Specified for an INPUT, OUTPUT, or INPUT-OUTPUT TABLE, TABLE-HANDLE, DATASET, or DATASET-HANDLE parameter in a called routine, this option forces the parameter to be passed to the local routine by value, which overrides any BY-REFERENCE option in the corresponding routine invocation. For more information on BY-REFERENCE, see the Parameter passing syntax reference entry.Defines a buffer parameter, where buffer-name is the name you specify for the buffer and database-table-name is the name of a database table to which the buffer is attached. Note that database-table-name can also specify the name of a temp-table. However, if the temp-table name is identical to a database table name, all ABL references to the database table name must use fully-qualified database-name.database-table-name syntax. A buffer parameter is always INPUT-OUTPUT.
Note: You cannot invoke a user-defined function remotely if it has one or more buffer parameters. For more information on remote user-defined functions, see OpenEdge Application Server: Developing AppServer Applications.
© 2013 Progress Software Corporation and/or its subsidiaries or affiliates. |