× 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.



Hans,
I agree with all but your final point.
>> And no one in any of those community could possibly
>> imagine assignment operations that worked like RPG's MOVE and MOVEA.

Aren't we already working towards putting a lot of that into the /FREE spec
by adding functionality to %DEC/%INT/%CHAR/%SUBARR?
If we also had a shorter version of %SUBST (such as %SST or even %STR) I
would say we're nearly there. 
Doesn't C allow, effectively, a MOVEL anyway?  memcpy(a,b,len) can be used
like MOVEL or MOVEL(P). Then there's always atoi() to take care of the
conversion. I don't see the issue. Perhaps the implicit vs explicit thing is
still bugging you (if I remember right that is one of your issues). But RPG
has so many implicit things, I don't see the problem if the following two
statements worked the same:
  C     MOVE  CUSTNO    ALPHACUST
  
    Eval   AlphaCust = CustNo
But this is also good enough:
    Eval AlphaCust = %Char(CustNo)

And I prefer the way EVAL currently works vs MOVE/MOVEL with character only
data. But as I said however, I wish %SUBST would be lost to obscurity and
replaced with %SST() (see CPF Release 5 or 6 for reasons why CL implemented
%SST).  Sure %SUBST is the same as the opcode name (whose name sucked from
the start) but who cares? I'd rather code %SST, %STR or %STG instead. This
is a tiny issue, but it has a huge impact on coding day-to-day when you have
to use %SUBST a million times. 
How many people on this list know that there is still a %SUBSTRING()
built-in function in CL? Originally that was the only substring built-in
there was. IBM added %SST after people bitched about the longer name for
years.
I could digress further and talk about QUAL vs QUALIFIED. I mean, I feel
like I'm typing in QUALIFIED.DATA.STRUCTURE.NAME when I type
Q.U.A.L.I.F.I.E.D.  </blog>

-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx]
On Behalf Of Hans Boldt
Sent: Wednesday, July 28, 2004 10:50 AM
To: rpg400-l@xxxxxxxxxxxx
Subject: Re: converting string to a numeric

Bob Cozzi wrote:
> RPG started out fixed, so whether or not it started out free is
irrelevant. 
> Some reasons the free-format stuff isn't 100% yet, is because it is new.
For
> example, when a new language, such as Java arrived on the scene, it had so
> many shortcomings and eventually became better (although the idea of Java
is
> like saying English should be spoken by all humans in all countries... It
> just doesn't make any sense to me at all, but I, as usual, digress. <g>)
> The point is there is a lot of legacy in RPGIV/RPGIII's columnar
> instructions. Granted there are some (many?) at IBM who think that the
> MOVE/MOVEL opcodes should not exist (why aren't their equivalent in
/FREE?)
> and those that think the truncating numbers on an assignment should always
> cause an error. Well, I could suggest that some people, way back when
choose
> RPG and the S/3x platforms because they were unlike all the other systems.
> That is they did things in a way so that we could get the job of running
> business applications done. 
> I could go on, but it could turn ugly. :)
> -Bo

Bob: Since you raise the point of the S/3x machines of past decades, it 
should also be pointed out that the computing machines of today are 
nothing like the S/3, S/32, S/34, etc. machines of the past. Up until 
relatively recently, programming has been largely concerned with the use 
of expensive and limited resources, such as memory. Application design 
was influenced largely by these limitations.

But that was then, this is now. Memory today is cheap, and you don't 
have to worry as much about allocating lots of storage. CPU's are now 
lightning fast, so performance isn't so much a concern. And so 
programming now is fundamentally different. The economics of programming 
have shifted with CPU and RAM now commodities. And so now it's become 
more important to use programmers more efficiently rather than to use 
the computing hardware more efficiently.

What's my point? Sure, the RPG legacy is important. And as far as I can 
predict, there will always be an RPG compiler to compile legacy RPG code 
on the iSeries and its successors. But the goalposts have moved since 
the S/3x days. Programming is different now, and older programming 
styles are becoming more and more passe.

As Chris P has pointed out, no one - NO ONE - in any other language 
community would (or could) even imagine Java or C or C++ or Perl or 
Python or whatever as a fixed-form language. And no one in any of those 
community could possibly imagine assignment operations that worked like 
RPG's MOVE and MOVEA.

Cheers! Hans

--
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.




As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

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.