Subscribe for automatic updates: RSS icon RSS

Login icon Sign in for full access | Help icon Help
Advanced search

Pages: [1]
  Reply  |  Print  
Author Topic: --# BDS comment in Genero  (Read 13230 times)
Stephen T.
Posts: 114


« on: September 05, 2013, 02:51:15 pm »

It seems that in BDS you could have  a comment marked with --# that effectively was a copiler directive to ignore that line in certain circumstances.
It also seems that this is in the Genero compiler (ie --# lines are NOT treated as comments) - is this a permanent feature to be compatible with BDS - so is presumably staying around for a while?

Is it documented anywhere? I searched the FGL doc buty only came up with references to SQL.
Rene S.
Four Js
Posts: 112


« Reply #1 on: September 06, 2013, 09:29:26 am »

This is a permanent feature. This feature exists since the first versions of BDL/Genero.
BTW: See this example. This example inverts the feature. The Informix compiler can see the lines between "--#{" and "--#}" as code. The Genero compiler sees the same lines as comment.

Code
  1. DEFINE a1, a2 DYNAMIC ARRAY OF INT
  2. --#{
  3.    allocate ARRAY a1[10] -- not visible for Genero, visible for i4gl
  4. --#}
  5.  

Scott B.
Four Js
Posts: 27


« Reply #2 on: September 06, 2013, 07:41:46 pm »

The --# is in the 4.2 documentation at this location:

https://4js.com/online_documentation/fjs-fgl-manual-html/User/LanguageFeatures.html#LF_COMMENTS

For the upcoming release, the Comments topic has been augmented to be more precise:

The symbol that immediately follows the -- comment indicator must not be the sharp (#) symbol, unless you intend to compile the same source file with the Informix® 4GL product. The --# specific comment indicator can be used to distinguish Informix 4GL from Genero BDL code. This conditional code compilation technique can be inverted by enclosing code blocks between --#{ and --#} comments:
Code
  1. MAIN
  2.  --# DISPLAY "Ignored by I4GL, but compiled with BDL."
  3.  --#{
  4.      DISPLAY "Ignored by BDL, but compiled with I4GL."
  5.  --#}
  6. END MAIN
Pages: [1]
  Reply  |  Print  
 
Jump to:  

Powered by SMF 1.1.21 | SMF © 2015, Simple Machines