**************************************************************************
*
* Procedure Name: FsiUtils_IIF
* Exported?: Yes
* Function: Immediate IF Function
* Returns: Value Supplied for True or False Condition
*
* Ex: NewOnly = FSIUTILS_IIF(@Status = stsNEW :*On :*Off);

**************************************************************************

P FsiUtils_IIF B EXPORT

D FsiUtils_IIF Pi 256a varying
D Condition n value
D TrueValue 256a varying value
D FalseValue 256a varying value

If Condition;
Return TrueValue;
Else;
Return FalseValue;
Endif;

P FsiUtils_IIF E



On Thu, Dec 11, 2025 at 10:59 AM Javier Sanchez <
javiersanchezbarquero@xxxxxxxxx> wrote:

Paul,

"C" has it as a native language for over decades. Can't see why that would
be complex for them to follow and make it available for devs.
Of course, and WADR, you need to "know what you are doing" with your return
value. That is kind of your intellectual work.
Efficiency and cleanliness of code is vital for modern languages. Elegant
code is, and simplicity is a major goal in our era.

JS

El jue, 11 dic 2025 a las 9:50, Paul Therrien via RPG400-L (<
rpg400-l@xxxxxxxxxxxxxxxxxx>) escribió:

Not knowing 'C' I asked Google.

Google AI says this:

The statement boolVal = (a = b ? 0: 1) in C is a syntactically valid but
potentially confusing use of the ternary operator and assignment operator
within a single expression [1].

What it does
Essentially, the line of code is a verbose way of setting boolVal based
on
whether b is zero or not, while simultaneously changing the value of a:
If b is 0: a becomes 1, and boolVal becomes 1.
If b is non-zero: a becomes 0, and boolVal becomes 0.

I think I can see why IBM might not be in a hurry to handle this request.





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