Article # 346, added by Geoworks, historical record
| first | previous | index | next | last |

Using @ifdef/@endif in GOC code.



Q. I have the following code fragment in my program and I get a
   Goc error saying "ifdef is undefined".

   @chunk optr enableDisableList[] = {
       @ifdef ZOOMER
       @MySaveTrigger,
       @endif
       @MyOtherObject
   };

A. The problem there is Goc thinks @ifdef is an object, instead of
   a directive. To fix it, have the @ifdef and @endif against the
   left margin, like this:

   @chunk optr enableDisableList[] = {
   @ifdef ZOOMER
       @MySaveTrigger,
   @endif
       @MyOtherObject
   };