Author Topic: How do you specify an 'else' in begin/end pairs?  (Read 2559 times)

nhed

  • Community Member
  • Posts: 12
  • Hero Points: 2
How do you specify an 'else' in begin/end pairs?
« on: January 05, 2007, 11:09:39 am »
I use gmake, which allows conditionals in the makefile (cant remember if other makes allow it)

Currently for the 'mak' extention I have entered the following for my Begin/end pairs
     (ifeq),(ifneq),(if)|(endif)

I cannot see any example on how to add the 'else' into that definition.
I know that the #if #else #endif is processed correctly in C, but C parsing
is ''special'' (begin/end pairs is grayed out)

Thanks
  -Nevo


hs2

  • Senior Community Member
  • Posts: 2734
  • Hero Points: 284
Re: How do you specify an 'else' in begin/end pairs?
« Reply #1 on: January 05, 2007, 11:54:57 am »
Due to the fact that 'if - else - endif' (and friends) is not a simple 'pair' some add. language dependent functionality is needed.
Therefore the 'else' support e.g. for C-style lang.s is coded (@see macros\pmatch.e: _c_find_matching_word).

I also thought about adding makefile/ (ba)sh support ... maybe I give it a try next time.
@Slickteam: Is there a plan to include some more _<ext>_find_matching_word in v12 ?

HS2