I4GL 7.30 HC5 problem using comments
Posted in 2001
Topics: Installation, Setup & Upgrades, Connectivity: ESQL/C, 4GL & Embedded SQL
Hello CDI, hope someone can help with the following problem/opportunity/feature(* delete as appropiate). We have just upgraded one of our test environments to use I4GL 7.30.HC5, and now the I4GL compile fails because we have the following comment line in all our source files (around 30,000 of them!), it's an ident string used to identify the object components that build an executable: --@(#) % full_filespec: accounts.4gl,16:4gl_src:1 % It now seems the "--@" is reserved for a particular purpose in I4GL, and as at present causes the compile to fail. Changing it to "---@" or "-- @" is fine (but damned inconvenient). I would like to know if this [behaviour] can be changed somewhere, I don't like the idea of checking out 1000's of source files just to amend a comment string (which is what Informix have recommended). Many thanks for any help received... TTFN -- Simon Barber
Extremely Curious. Did they tell you what --@ was used for in I4GL and with what version. I've been using Informix 4GL since 1986 and this is the first I've heard of it. Rob Vorbroker Simon Barber <beaker@century.demon.co.uk> wrote in message news:3Ujd5CAWPCh6QAGm@century.demon.co.uk... > Hello CDI, hope someone can help with the following > problem/opportunity/feature(* delete as appropiate). > > We have just upgraded one of our test environments to use I4GL 7.30.HC5, > and now the I4GL compile fails because we have the following comment > line in all our source files (around 30,000 of them!), it's an ident > string used to identify the object components that build an executable: > > --@(#) % full_filespec: accounts.4gl,16:4gl_src:1 % > > It now seems the "--@" is reserved for a particular purpose in I4GL, and > as at present causes the compile to fail. Changing it to "---@" or "-- > @" is fine (but damned inconvenient). > > I would like to know if this [behaviour] can be changed somewhere, I > don't like the idea of checking out 1000's of source files just to amend > a comment string (which is what Informix have recommended). > > Many thanks for any help received... > > TTFN > -- > Simon Barber
Simon Barber wrote in message <3Ujd5CAWPCh6QAGm@century.demon.co.uk>... >Hello CDI, hope someone can help with the following >problem/opportunity/feature(* delete as appropiate). > >We have just upgraded one of our test environments to use I4GL 7.30.HC5, >and now the I4GL compile fails because we have the following comment >line in all our source files (around 30,000 of them!), it's an ident >string used to identify the object components that build an executable: > >--@(#) % full_filespec: accounts.4gl,16:4gl_src:1 % > >It now seems the "--@" is reserved for a particular purpose in I4GL, and >as at present causes the compile to fail. Changing it to "---@" or "-- >@" is fine (but damned inconvenient). > >I would like to know if this [behaviour] can be changed somewhere, I >don't like the idea of checking out 1000's of source files just to amend >a comment string (which is what Informix have recommended). > You are indeed seeing a new "feature" of 4GL from about 7.30. It started like this: A company called FourJays from France invented a copy of 4GL which could work with GUI screens and mouses. They added a few special functions of their own, but for people who wanted to use the Informix compiler as well as the FourJays compiler, they needed a special syntax to "hide" the special FourJays code. They invented the --# this is processed by the FourJays compiler as the way so hide code from Informix compilers but it would be seen from the FourJays compiler. After that, Informix bought the rights to sell the FourJays compiler and that is what we all call Dynamic 4GL. I haven't actually sat down in front of a Dynamic 4GL compiler, only the FourJays compilers, but my understanding is that it takes exactly the same syntax as FourJays compilers. Now, since the --# was a good idea, and also because SOMETIMES you want to hide code from FourJays but make it visible to Informix, ON KEY .... being an excellent example, they decided to add something similar to Informix 4GL. They chose --@ and now Simon and his company has a problem. POSSIBLY it may be configurable whether the compiler recognises the --@ or not, but I wouldn't hold my breath for that. BUT - if you have Perl, try this command on all your 4GL files: perl -pi.old -e 's/--\\@/---\\@/' *.4gl This will do an inplace edit of all the .4gl files. It will save a copy of the old .4gl files with .old added to their names. If you DON'T want to keep those .old files then remove the .old from the command line but you must leave the options like this: -pi -e etc etc Anyway, any similar trick with sed or awk will do the conversion for you.
In article <961lc9$7lne$1@newssvr06-en0.news.prodigy.com>, ROBERT B VORBROKER <ROBVORBROKER@prodigy.net> writes >Extremely Curious. Did they tell you what --@ was used for in I4GL and >with what version. I've been using Informix 4GL since 1986 and this >is the first I've heard of it. > >Rob Vorbroker > Informix have said that they are "conditional comments" that will be treated as a comment by D4GL but passed to I4GL as a valid command (i.e. not a comment!). Apparently, "--#" is treated vice-versa as a comment by I4GL but not by D4GL. I'm not a C programmer but it seems they're trying to pass "pre- processor" directives to the compiler (it's a shame they didn't use similiar syntax. Thanks for all the replies, it looks like I'll have to check-out all the files, if we didn't have a CCM structure it wouldn't be such a pain! Cheers Simon >Simon Barber <beaker@century.demon.co.uk> wrote in message >news:3Ujd5CAWPCh6QAGm@century.demon.co.uk... >> Hello CDI, hope someone can help with the following >> problem/opportunity/feature(* delete as appropiate). >> >> We have just upgraded one of our test environments to use I4GL 7.30.HC5, >> and now the I4GL compile fails because we have the following comment >> line in all our source files (around 30,000 of them!), it's an ident >> string used to identify the object components that build an executable: >> >> --@(#) % full_filespec: accounts.4gl,16:4gl_src:1 % >> >> It now seems the "--@" is reserved for a particular purpose in I4GL, and >> as at present causes the compile to fail. Changing it to "---@" or "-- >> @" is fine (but damned inconvenient). >> >> I would like to know if this [behaviour] can be changed somewhere, I >> don't like the idea of checking out 1000's of source files just to amend >> a comment string (which is what Informix have recommended). >> >> Many thanks for any help received... >> >> TTFN >> -- >> Simon Barber > > -- Simon Barber
Simon Barber wrote in message ... >In article <961lc9$7lne$1@newssvr06-en0.news.prodigy.com>, ROBERT B >VORBROKER <ROBVORBROKER@prodigy.net> writes > >I'm not a C programmer but it seems they're trying to pass "pre- >processor" directives to the compiler (it's a shame they didn't use >similiar syntax. > They are not preprocessor commands, they are valid 4GL lines of code. Here's why: With FourJays (4JS) or D4GL, you sometimes need to put in bits of code that are only seen by one compiler or the other - for example, colour attributes on input statements. The --@ allows you to do this: input blah blah blah --@ attributes (red) # that line only seen by 4GL not D4GL or 4JS The reason is: in graphical mode under 4JS or D4GL, colour attributes interact rather badly with the general colour setup of the GUI environment, but for your customers still running character 4GL, you want to keep all the attractive colours. Similar, opposite requirements were supported in 4JS/D4GL by the --# syntax: --# if fgl_fglgui() then --# let ch = fgl_winbutton("Title", "Message", "OK", "OK|More>>", "stop", 0) --# else prompt "Messasge" for char ch --# end if This way, the code could present a pretty window when in GUI mode, and the tried but true prompt statement when in character. Since the fgl_fglgui() and fgl_winbutton() functions are not supported with Informix 4GL, they need to be totally hidden from the Informix compilers.