The equal sign makes it a bool comparison. The CONST allows the char field to cast the bool to a string. Not sure what false would cast to however. My best guess at least.
On Fri, 2021-07-16 at 10:24 -0500, DEnglander--- via RPG400-L wrote:
I have a piece of code that compiles with no errors. It runs, but doesn't
do anything.
Here is the code:
wrt_job_log('*** ' + %trim(sdprogram) = ': Price Change Report ' +
'has completed for Customer #' +
%trim(%editc(e1cust : 'X')) + '.');
I accidentally typed an equal sign and it should be a plus sign right
before the colon. The compiler took it, compiled it with no error, but
when the program gets to the line, it doesn't write a job log entry.
Once I saw the problem, I changed the = to a plus, recompiled and reran.
There is now an entry in the joblog.
Prototype wrt_job_log accepts a CHAR(512) field with CONST defined.
Is this a compiler bug?
Doug
"CONFIDENTIALITY NOTICE: This e-mail transmission (and/or the attachments accompanying it) contain confidential information belonging to the sender. The information is intended only for the use of the intended recipient. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or the taking of any action in reliance on the contents of the information is strictly prohibited. Any unauthorized interception of this transmission is illegal under the law. If you have received this transmission in error, please promptly notify the sender by reply e-mail, and then destroy all copies of the transmission."
[
https://www.medtronsoftware.com/img/MedtronMinilogo.bmp] Kevin Bucknum
Senior Programmer Analyst
MEDDATA / MEDTRON
120 Innwood Drive
Covington LA 70433
Local: 985-893-2550
Toll Free: 877-893-2550
https://www.medtronsoftware.com
CONFIDENTIALITY NOTICE
This document and any accompanying this email transmission contain confidential information, belonging to the sender that is legally privileged. This information is intended only for the use of the individual or entity named above. The authorized recipient of this information is prohibited from disclosing this information to any other party and is required to destroy the information after its stated need has been fulfilled. If you are not the intended recipient, or the employee of agent responsible to deliver it to the intended recipient, you are hereby notified that any disclosure, copying, distribution or action taken in reliance on the contents of these documents is STRICTLY PROHIBITED. If you have received this email in error, please notify the sender immediately to arrange for return or destruction of these documents.
As an Amazon Associate we earn from qualifying purchases.