Re: 4GL Help Numbers: Yuchh!
Posted in 1997
Felix Koshy Mathews wrote: > > In <E97B7u.H7D@nonexistent.com>, Jacob Salomon wrote: > <snip> > >Since I first experienced the 4GL HELP mechanism, with its help numbers > >hard-coded in the 4GL code, I have wished for help labels as strings. >With strings I can use some kind of acronym for what the help message > >means, which module or component of the application the help message is > >for. I entered a feature request for such a modification to the help > >mechanism AGES ago but that has vanished down the oubliette. > > > >FourGen used a 4-part composite key (OK, 3 parts identify the body of > >help text) and this sounds pretty good in principle. However, the > >application I want to add help to was not generated with FourGen so >this would be a mighty big wheel to reinvent. > > > <snip> > > Jake, > If you are willing to use cpp, then you have a way. Define macros in a > *.h file and include it in your *.4gl and *.hlp, do cpp for these files > with cpp -P "file_name" > pp"file_name", then use use pp"file_name" for > c4gl / fglpc / mkmessage. > You might also consider using m4 intead of cpp. But a word of warning. A few months back I helped with an upgrade job at a site which did this using cpp (they actually retained an older version of the c compiler because their current one didn't have a separate cpp). They had menu names, command strings, help strings and, I think other messages all inserted as macros. They used KEY as well as COMMAND in their menu items. This was OK until the new version of 4GL went in which checked for conflicts. There were several. It was easy to review the post-processed code for conflicts. They only way to navigate the original code was to put two terminals side by side and use the other statements as sign-posts. There were 3 of us working on it with only a few hours to review all the code so that they could launch an overnight build and do a full test next day, Sunday, so as to be back in production on the Monday. We succeeded but it took considerably longer than it would had they written straight code. Ian