I'm not as concerned about the old style format strings as I am about 
the readability of the code and ease of future modification concerning 
the printed (CRT'd in this case) string. I'd do this:

OUT.LINE = FMT(OCONV(VAR1,"MD0"),"R#6 ")
OUT.LINE := FMT(OCONV(VAR2,"MD2"),"R#10")
OUT.LINE := FMT(OCONV(VAR3,"MD4"),"R#14")
CRT OUT.LINE


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".
>
>
>
> DISCLAIMER:
> Disclaimer.  This e-mail is private and confidential. If you are not the 
> intended recipient, please advise us by return e-mail immediately, and delete 
> the e-mail and any attachments without using or disclosing the contents in 
> any way. The views expressed in this e-mail are those of the author, and do 
> not represent those of this company unless this is clearly indicated. You 
> should scan this e-mail and any attachments for viruses. This company accepts 
> no liability for any direct or indirect damage or loss resulting from the use 
> of any attachments to this e-mail.
> -------
> u2-users mailing list
> u2-users@listserver.u2ug.org
> To unsubscribe please visit http://listserver.u2ug.org/
>
>   

-- 
------------------------------------------------------------------------
Jeff Schasny - Denver, Co, USA
jeff at schasny dot com
------------------------------------------------------------------------
-------
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/

Reply via email to