A BUG in 4GL ??
Posted in 1992
Below is a program lifted from our Unisys 5000/80 running 4GL version 4.00UE3. It's a short little thing that displays a form that holds a menu for an application that I have yet to complete. As you can see, I prompt the users for their choice and will later call some functions. When I compile it I get "line 514: warning: statement not reached." The WHILE loop with the PROMPT statement works ok, but the program ends up in an infinite loop. The CASE is skipped altogether. It seems the GOTO at the bottom is not being handled properly. Is this a Bug?? Also the form has some graphics characters in it (just a box around the title) that are not getting converted. Form graphics have worked fine with other programs. Yes, I know it's not the very best of programming technique to use the GOTO, but it lets me avoid having a nested WHILE with an EXIT WHILE inside the CASE (which by the way is how I fixed this; and yes there're other ways to do it). Any Bug #'s on this Informix? - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - database sfbase MAIN define msel char(1) # <--- the user's menu selection. defer interrupt options input wrap open form rp_men from "tkw2" label dsf: display form rp_men # <--- Display the menu form. options prompt line 15, message line 15 while true prompt " Enter selection and press Return: " for char msel if msel not matches "[1-4]" then display msel, " is not a valid option. Try again." at 15,25 sleep 4 end if end while case msel when "1" clear screen # call rp_qry() <--- this function not yet coded. when "2" message " Option 2, not yet implemented." attribute (reverse) sleep 4 message "" when "3" message " Option 3, not yet implemented." attribute (reverse) sleep 4 message "" when "4" clear screen exit program otherwise display msel, " is not a valid option." at 15,25 sleep 3 end case goto dsf END MAIN - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --- John B. =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= John Baker, USAISC-Lex, Lexington - Blue Grass Army Depot, Lexington, KY jbaker@lexington-emh2.army.mil Phone: (606) 293-3644, 293-3743 DSN: 745- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=