|
This makes sense to me. I've pretty much avoided the use of MOVE for type conversion, partly because it made me uneasy, and partly because I didn't want to learn the subtleties. <g> I'd rather see something that lets you know that there's type conversion going on without your having to know the data types of the variables. I guess I've been pretty extreme, I've never used the MOVE and MOVEL method to concatenate strings either. > -----Original Message----- > From: Bob Cozzi (RPGIV) [mailto:cozzi@rpgiv.com] > Sent: Wednesday, February 27, 2002 8:01 AM > To: rpg400-l@midrange.com > Subject: RE: Strange behavior w/%editc() > > > Buck, > > > I shouldn't, but I will... > > Rather than bemoan the loss of MOVE in /free, why not write some > procedure > > wrappers that make more sense. I mean (in the spirit of Bob's 'make > it > > clear') that MOVE can convert decimal to character, it can overlay > some > > parts of a variable, etc. Rather than an overloaded MOVE, > wouldn't my > code > > make more sense if it looked more like > > text = decToChar(YTDSales: toCharLength); > > > > instead of > > MOVE YTDSLS TEXT > > > > To an aged-old RPG programming? Maybe, maybe not. > To a new RPG programmer (under say 7 years experience) probably. > To a non-RPG programming that is a new RPG programmer with less than a > years experience in RPG, but some experience/training in non-RPG > languages... probably. > > There certainly needs to be: > > CharToDec() > DecToChar() > CharToHex() > HexToChar() > > I realize we already have %CHAR() that converts decimal to character. > But we also have %DEC() which does not convert character to decimal. > So I think we need some new built-in functions that are named > consistently, OR we need %DEC to also convert character values to > decimal. > > Bob Cozzi > > >
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.