| 
       UNBOX ( object-reference )
       | 
| 
       USING System.Data.* FROM ASSEMBLY.
        DEFINE VARIABLE dataTable1 AS DataTable. DEFINE VARIABLE dcCustNum AS DataColumn. DEFINE VARIABLE dcName AS DataColumn. DEFINE VARIABLE row1 AS DataRow. DEFINE VARIABLE iVal AS INTEGER. dataTable1 = NEW DataTable( INPUT "Customer" ). /* Create columns for a dataTable */ dcCustNum = NEW DataColumn( INPUT "CustNum" ). dcName = NEW DataColumn( INPUT "Name" ). dataTable1:COLUMNS:ADD( INPUT dcCustNum ). dataTable1:COLUMNS:ADD( INPUT dcName ). /* Create a new row */ row1 = dataTable1:NewRow( ). /* Add data to row. */ row1:Item["CustNum"] = 5. row1:Item["Name"] = "Mr Jones". /* Process a value from the row. Without UNBOX, this does not compile.*/ iVal = UNBOX( row1:Item["CustNum"] ) MODULO 2. /* 1 = an odd value */ | 
 You must use the UNBOX function if you want to reference an appropriate System.Object property or method return value in an ABL primitive expression, such as when performing arithmetic operations together with compatible ABL variables, fields, or literal values. Invoke the UNBOX function directly in the expression, passing it the System.Object as input, where you would otherwise reference the System.Object itself.
You must use the UNBOX function if you want to reference an appropriate System.Object property or method return value in an ABL primitive expression, such as when performing arithmetic operations together with compatible ABL variables, fields, or literal values. Invoke the UNBOX function directly in the expression, passing it the System.Object as input, where you would otherwise reference the System.Object itself.
   For any direct assignment of a .NET object or object array to a compatible ABL primitive value or array, use of the UNBOX function is optional, because ABL automatically unboxes the underlying .NET object or array object type to its matching ABL primitive or array type.
For any direct assignment of a .NET object or object array to a compatible ABL primitive value or array, use of the UNBOX function is optional, because ABL automatically unboxes the underlying .NET object or array object type to its matching ABL primitive or array type.
   If you have a variable or field defined as a compatible ABL array type that you provide as an argument to an OUTPUT parameter of a .NET method defined as a .NET array object, ABL automatically unboxes the .NET array object into the ABL array argument. This automatic unboxing does not occur for an ABL method, procedure, or user-defined function passing the same parameters. In this case, you can use a direct assignment from a compatible .NET array object argument or use the UNBOX function to explicitly do the necessary conversion.
If you have a variable or field defined as a compatible ABL array type that you provide as an argument to an OUTPUT parameter of a .NET method defined as a .NET array object, ABL automatically unboxes the .NET array object into the ABL array argument. This automatic unboxing does not occur for an ABL method, procedure, or user-defined function passing the same parameters. In this case, you can use a direct assignment from a compatible .NET array object argument or use the UNBOX function to explicitly do the necessary conversion.