Sometimes it is desirable, for enhanced performance or to interoperate with a non-VisualAPL language, to cast a VisualAPL 'CVAR' type variable to another data type.
For example (in Cielo Explorer - the VisualAPL 'session):
Cielo Explorer for Visual Studio - Professional v1
Cielo 1.0.7001
Copyright © VisualCielo. All rights reserved.
clear session
c=1.2344342
a=(double[])c
a.GetType()
System.Double[]
Strong data typing may be used to enhance performance of a VisualAPL function or coerce data to a data type which is required for a specific .Net class.
To see more examples of type coercion, download the attached file "More_VisualAPL_TypeCasting.pdf".
To see an example of coercing the datatype of the result of the []ucs function, download the attached "DataTyping and []UCS Example.pdf" file.
To see the potential performance benefits of VisualAPL using strong data typing, download the "Visual_StrongDataTyping_Performance.pdf" document and the associated Visual Studio 2008 VisualAPL console project in the "VectorProcessTiming.zip" file.