Midrange News for the IBM i Community


Posted by: neilrh
A/P
Jackson, MI
Strange compile messages:
has no ratings.
Published: 10 Aug 2012
Revised: 23 Jan 2013 - 2119 days ago
Last viewed on: 12 Nov 2018 (3614 views) 

Using IBM i? Need to create Excel, CSV, HTML, JSON, PDF, SPOOL reports? Learn more about the fastest and least expensive tool for the job: SQL iQuery.

Strange compile messages: Published by: neilrh on 10 Aug 2012 view comments(3)

Return to midrangenews.com home page.
Sort Ascend | Descend

COMMENTS

(Sign in to Post a Comment)
Posted by: bobcozzi
Site Admin ****
Chicagoland
Comment on: Strange compile messages:
Posted: 6 years 3 months 4 days 13 hours 29 minutes ago

Neil, this too was discussed during our training at your location. I actually poke fun at the compile. I've got to get more interesting when I talk about this stuff--to keep you awake. Tongue Out

Posted by: neilrh
Premium member *
Jackson, MI
Comment on: Strange compile messages:
Posted: 6 years 3 months 4 days 13 hours 15 minutes ago

Yeah, I got used to the compiler complaining the line below the bad statement, and I remember that part of the talk - sometimes you have an error and the compiler decides it's the next line that is really in error.

I'm just bemused that the compiler also seems to have a random number generator attached to the "pick which line to report the error for" routine.  I looked back at the code and there is a similar "CusNr = AND %scan" on lines 63906/63907.  Why pick 63909?  It's more logical to pick 63902, the first occurrence of generating *on/*off to eval into a numeric field, or maybe 63911 the last line of the eval.

Posted by: bobcozzi
Site Admin ****
Chicagoland
Comment on: Strange compile messages:
Posted: 6 years 3 months 4 days 11 hours 7 minutes ago

Ah! But I do see the pattern and understand why they did it that way--I don't agree with their decision, but I see why.