Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2005-03

h2pas and #elif

2 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Attila Kinali

Hi,

I tryed to convert a couple of .h files to
pascal units and run across the problem
that #elif aren't converted properly,
ie that they are left as
(*** was #elif ****){$else defined(WIN32)}
and thus completely ignored.

A quick look at the h2pas code revieled
that this case isn't handled at all
(ie needs to build a stack to keep track
of #elif's).

Did anyone else already solve this problem
or shall i try to extend h2pas ?

Attila Kinali

郷に入れば郷に従え

Reply by email

Peter Vreman
to Attila Kinali
Show quoted text 16 lines
Hi, I tryed to convert a couple of .h files to pascal units and run across the problem that #elif aren't converted properly, ie that they are left as (*** was #elif ****){$else defined(WIN32)} and thus completely ignored. A quick look at the h2pas code revieled that this case isn't handled at all (ie needs to build a stack to keep track of #elif's). Did anyone else already solve this problem or shall i try to extend h2pas ?

If it is not in the current code then it is not supported. You are welcome to extend h2pas. Current FPC 1.9.x supports {$elseif} so it shouldn't be that hard.

Reply by email