Also, according to the UniBasic Reference Manual, "The FMT function can
produce different results based on the BASICTYPE setting." So, if we are
going to discuss programming standards, do we have to discuss them for each
BASICTYPE flavor? The manual documents what happens with BASICTYPE U, but
those of us who are in SB shops are required to use BASICTYPE P, where the
documentation does not often specify what the variations will be.
Susan M. Lynch
F.W. Davison & Company, Inc.
----- Original Message -----
From: "Bill Haskett" <[EMAIL PROTECTED]>
To: <u2-users@listserver.u2ug.org>
Sent: Tuesday, November 20, 2007 3:14 PM
Subject: RE: [U2] OCONV Extraction Question - Good Practice
Adrian:
I'm not sure about the disaster part. We've moved from D3 to Unidata (a
trying
experience) and the string handling seems to work fine. We have code
like:
CRT OCONV(VAR1, 'MD0') "R(#06)" :
CRT OCONV(VAR2, 'MD2') "R(#10)" :
CRT OCONV(VAR3, 'MD4') "R(#14)" ; ** end of output line
...and it works perfectly. So, since FMT isn't (or at least hasn't been)
as portable
as the string formating code (FMT wasn't part of the Adds, GA, R83,
AdvPick, D3 line
of MV), I'd say using FMT violates the guideline of "make it portable".
Just a thought...
Bill
Womack, Adrian wrote:
IMO, the only thing wrong with your example is the use of the trailing
format strings - everyone (and I mean everyone) should be using the FMT
function, making your example:
CRT FMT(OCONV(VAR1,"MD0"),"R#6 "):FMT(OCONV(VAR2,"MD2"),"R#10
"):FMT(OCONV(VAR3,"MD4"),"R#14")
The old method is a disaster waiting to happen.
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of MAJ Programming
Sent: Tuesday, 20 November 2007 2:12 PM
To: u2-users@listserver.u2ug.org
Subject: Re: [U2] OCONV Extraction Question - Good Practice
Here begins the voting for differences.
I actually do not care for the inclusion of the extra Var1.F variables
as, mentioned earlier, is that variable used elsewhere? Plus, it implies
that it maybe part of a calculation instead of an upcoming, disposable
CRT statement.
Will I rot as I use this CRT statement?
CRT OCONV(VAR1,"MD0")"R#6':" ":OCONV(VAR2,"MD2")"R#10":"
":OCONV(VAR3,"MD4")"R#14".
-------
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/
-------
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/