RTP Series - RTP19
Published By | Date | Version | Knowledge Level | Keywords |
---|---|---|---|---|
Sprezzatura Ltd | 01 JUN 1989 | 1.13+ | EXPERT | RTP19, OCONV, PICK |
OCONV processor. Has following undocumented (and not very useful) features, left in for PICK compatibility.
U50BB Bug (doesn't work) U10DD Returns SERIAL() U60E0 Returns @CRTWIDE U70E0 Turns echo on U80E0 Turns echo off
OCONV permits multiple data values separated by value marks. Thus to OCONV a dynamic array of dates it is not necessary to process each date in turn, rather the entire array can be OCONVed i.e.
@ANS - OCONV(DATE.ARRAY,"D2/E")
Similarly, OCONV allows conversions to be stacked separated by value marks. Thus the expression
PRINT OCONV(600000,"MD2": @VM : "D2/E")
would print "04/06/85" as the 600000 would first be MD2ed to 6000 and then D2/Eed to 04/06/85.
Note that both data values AND conversions can be stacked but if this is done the stacking is not performed in a one to one manner - rather each data value is taken and converted through each of the conversions before the next data value is touched, thus
VALS = 600000 : @VM : 600100 @ANS = OCONV(VALS,"MD2" : @VM : "D2/E")
would return @ANS equal to :04/06/85" : @VM : "05/06/85".
Remember that OCONVing can be accomplished by implicit formatting, much in the same way that data formatting can be explicit or implicit (i.e. PRINT FMT(A,"L#10") is functionally equivalent to PRINT A "L#10"). Thus PRINT D "D2/E" is identical to PRINT OCONV(D,"D2/E") except that it is a lot easier to code!
(Volume 1, Issue 2, Page 8)