Project ID | FD17E29641C6117580258994003AF3B0 |
Version | 3 |
Class ID | E98AE656DE43682F802589940041028C |
Class Type | Base |
Attributes |
%REM
The following code shows how to create a transformer to convert scalars to doubles. The code is very basic with no error handling.
%END REM
Class DoubleTransformer as CollectionTransformer
Function transform(source as Variant) as Variant
If (IsNumeric(source)) Then
If (Not TypeName(source) = "BOOLEAN" And Not IsDate(source)) Then
transform = CDbl(source)
End If
End If
End Function
End Class
Dim coll1 as New Collection("SCALAR", Nothing, False, False)
Dim coll2 as New Collection("DOUBLE", Nothing, False, False)
Dim transformer as New DoubleTransformer()
' Populating collection omitted
Call coll1.transform(transformer, coll2)
Copyright © HCL America, Inc. 1999, 2023. All Rights Reserved.