OCONVS Function
Applies an English output conversion to the elements in a dynamic array.
Syntax
OCONVS(dynArray, conversion)
Syntax Elements
dynArray A DataBasic expression that evaluates to a dynamic array.
conversion A string containing one or more English conversion codes, separated by value marks. Multiple codes are processed left-to-right, each code acting on the result produced by the previous code.
Return Value
A dynamic array with the same structure as dynArray, but with each element formatted as specified by conversion.
Comments
If the conversion is invalid or null, a run-time error is generated and OCONVS returns null.
Note
After you have called OCONVS, the STATUS function returns 0 if the conversion was valid; otherwise 2.
See Also
OCONV function, ICONVS function.
Examples
ARY = 1234:@VM:2:@VM:-012345 FMAT = "MD2" NEWARY = OCONVS(ARY, FMAT)
Applies the MD2 conversion code to each element of dynamic array ARY; sets NEWARY to "12.34VM0.02VM-123.45" (see MD conversion code).
ARY = "3*179*7":@VM:"OP*QR*ST*UV*WX" FMAT = "G1*1" NEWARY = OCONVS(ARY, FMAT)
Applies the G1*1 conversion code to each element of dynamic array ARY; sets NEWARY to "179VMQR" (see G conversion code).
ARY = "3*179*7":@VM:"OP*QR*ST*UV*WX" FMAT = "G1*1":@VM:"MCL" NEWARY = OCONVS(ARY, FMAT)
Performs the same data extraction as in the previous example, but passes the result to the MCL conversion code, to force the extracted data into lower case: "179VMqr".