Re: Is the 4gl 4.12/13/whatever compiler a bit smarter
Posted in 1994
kerry@kcbbs.gen.nz (Kerry Sainsbury) writes: >The 4.10 4GL compiler is a bit stupid. Are later versions smarter? >Specifically: >MAIN > WHENEVER ANY ERROR STOP > CALL b() > CALL a() >END MAIN >FUNCTION a() > WHENEVER ANY ERROR CONTINUE >END FUNCTION >FUNCTION b() >DEFINE i INTEGER > LET i = 1 / 0 >END FUNCTION >This program will *NOT* stop with an error message in function b. >It also really annoys me that I have to remember to put >WHENEVER ANY ERROR CALL serious_error in the front of every program >module if I want to use my own error handling routine. This is expected behavior. WHENEVER is a compile switch; it alters code at compile time to handle the error checking as you request, not at run time, so that the WHENEVER ERROR condition physically above the line of code in question is the setting, regardless of the sequence of function calls at compile time. So yes, include a WHENEVER ERROR statement in the first function of each module. I agree it's a pain, but it doesn't even make the top 10 of MY 4gl wish list. >or: >DISPLAY l_variable + 1 TO screen_field > `------v-------' >4GL seems incapable of coping with this sort of expression evaluation >anywhere. See the answer above. It's nice, but not that much of a limitation. >or: >Why the hell can't I use the PRINT command in a function? It sure would >save some code duplication at times! can you use DISPLAY instead? I think the power of the REPORT function speaks for itself (I know many installations that are using a non-4GL client/servier interface that buy 4GL just for the reporting capabilities). Since you can CALL other functions from the REPORT function, I think code duplication isn't as big an issue in reports as it is in the INPUT statement. >THE QUESTIONS: >Are any of these things considered bugs? I doubt it. >Are any of these things likely to change in future versions? I doubt it. >What is the ETA of 4GL++? Shipping in July, 1994. I was told this yesterday, so I think it's a solid date. Remember, your platform may be a bit later. >Is 4GL++ going to be backwards compatable with 4GL? Yes and no. There will be a migration path provided, but not necessarily a blind, blanket, plug-and-play compatability we all would love. See your sales rep for details. >I'm happy working with Informix, I just want to live in a perfect world! Me to. ============================================================ Dennis J. Pimple Informix Software Inc Senior Consultant Denver Colorado USA dennisp@informix.com Voice:303-850-0210 Fax:303-779-4025