× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



MOVE does what it says it does.  It just isn't simple unless the two
variables are the same data type and the same length. My first reason for
not learning all the subtleties is that I'm too lazy.  It may be a personal
quirk, but I like type casting between numeric and character data types to
be explicit.  In all fairness, I never liked the the way people use
character variables in C as integers when it's convenient--like adding and
subtracting to change case.  

MOVE is a very powerful tool.  It's very easy to misuse.  I take the
coward's way out and avoid it.  

> -----Original Message-----
> From: Steve Richter [mailto:srichter@autocoder.com]
> Sent: Wednesday, February 12, 2003 11:16 AM
> To: RPG programming on the AS400 / iSeries
> Subject: RE: MOVE (was: /FREE RPG compiler errors)
> 
> 
> poor MOVE, getting its ass kicked.  From the sounds of people 
> saying they
> prefer specific functions that work on specific types of 
> data, a reader
> would guess that everyone would rather code in assembler!
> 
> MOVE does what it says it does.  It copies the value of 
> factor 2 into the
> result variable.  When the data types dont match, the copied value is
> converted in a predictable way, just like the programmer 
> wants it to. In my
> view, the only problem with MOVE is that it does not pad fill 
> the result
> variable.
> 
> For the price of not allowing fixed position rpg to be 
> upgraded to /free, it
> seems like keeping /free MOVE free is not worth the "trouble" 
> of including
> it.
> 
> Steve
> 
> -----Original Message-----
> From: rpg400-l-bounces@midrange.com
> [mailto:rpg400-l-bounces@midrange.com]On Behalf Of Joel Fritz
> Sent: Wednesday, February 12, 2003 12:32 PM
> To: 'RPG programming on the AS400 / iSeries'
> Subject: RE: MOVE (was: /FREE RPG compiler errors)
> 
> 
> Got to agree with you.  I never learned the ins and outs of 
> MOVE for two
> reasons.  First I was too lazy to memorize it all, and second I really
> didn't like the idea of MOVE doing anything but simple minded 
> assignment.  I
> don't like "tricky" code if it doesn't give a HUGE 
> performance boost.  I
> want to make sure a complete idiot like me can understand the 
> program.  In
> RPG Classic it's not too hard to do the other things MOVE can 
> do without
> using it.  For some things like numeric conversions using 
> MOVE doesn't save
> you much work if you take the trouble to validate the data.  
> I've gotten a
> couple <g> of support calls in the middle of the night about 
> programs that
> use MOVE to convert character to numeric.
> 

As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.