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



Ditto.  If I wanted to ensure positive number, I would use abs() in C or %abs() in RPG.  


Roger Harman
COMMON Certified Application Developer – ILE RPG on IBM i on Power
OCEAN User Group
<http://www.ocean400.org>


----------------------------------------
Subject: Re: RPG Compiler (and RDi Syntax Checker) weirdness
From: mmurphy@xxxxxxxxxxxxxxx
To: rpg400-l@xxxxxxxxxxxx
Date: Tue, 31 Mar 2015 13:36:57 -0400

I've never seen anywhere I would need a unary plus even when programming in C.

Mark Murphy
STAR BASE Consulting, Inc.
mmurphy@xxxxxxxxxxxxxxx


-----John Yeung <gallium.arsenide@xxxxxxxxx> wrote: -----
To: "RPG programming on the IBM i (AS/400 and iSeries)" <rpg400-l@xxxxxxxxxxxx>
From: John Yeung <gallium.arsenide@xxxxxxxxx>
Date: 03/31/2015 12:20PM
Subject: Re: RPG Compiler (and RDi Syntax Checker) weirdness

On Tue, Mar 31, 2015 at 11:17 AM, Mark Murphy/STAR BASE Consulting
Inc. <mmurphy@xxxxxxxxxxxxxxx> wrote:
Yea, when John wrote that, it made sense, just looks strange.

Unary plus is indeed strange in most everyday contexts, especially in
business logic. In a language like RPG, the most compelling rationale
for even having it in the language is for symmetry with the unary
minus. (If you're thinking that sounds pretty weak, I agree!)

In other languages, unary plus is not *as* useless, though still not
particularly useful. You have to be doing something fairly exotic for
it to actually be important.

John Y.
--
This is the RPG programming on the IBM i (AS/400 and 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.
--
This is the RPG programming on the IBM i (AS/400 and 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.