|
>Date: Mon, 14 Jan 2002 13:46:03 -0500 >From: "Mike Naughton" <mnaughton@juddwire.com> > > .... But I still like using MOVEs to put >characters into decimal fields and vice versa -- I know I could use data >structures or atol() or %EDITC, but MOVE is simple, and it works. And now >I have this MOVEA thing. . .) >What do you think? (and, thanks!) Mike, if you're asking whether I think there's a case for blessing MOVE and its friends by adding them to the set of free-form opcodes, then no, I don't think so. Your particular function of setting everything after a certain array element might be a common enough problem to warrant some special syntax to accomplish easily. But your particular case is another one of the kind where the array isn't even necessary. A simple substring will do: EVAL %subst(field : start) = *all'*' Regarding moving between characters and numerics, MOVE and MOVEL have some very odd behaviour that doesn't really have much use these days. Basically, the "character" form of the numeric data is really the zoned value. So -12345 becomes '1234M'. When the numeric value and character value are the same length, it's easy to use a zoned/character overlay to get the same results. Where they are different lengths ... well, then you get into the really bizarre behaviour that I think would be better spelled out in the code. MOVE A B looks too innocuous, if what it's really doing is overlaying the last 3 digits of B with some new digits, leaving the rest the way they are. Barbara Morris
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.