Hi Steve, yes, I think the last block is was what I expected. The first block for tunnel=no surprised me because of the missing railway=* clause in the first rearranged rule.
Gerd ________________________________________ Von: mkgmap-dev <[email protected]> im Auftrag von Steve Ratcliffe <[email protected]> Gesendet: Samstag, 5. Januar 2019 19:41 An: [email protected] Betreff: Re: [mkgmap-dev] Not-equal compare bug? Hi Gerd > yes, I think this is a bug. In opposite to the previously posted rules your > rules should work. > @Steve: If I got that right the ExpressionArranger kicks in too early. It > should only be called when the if-stack is empty (again). > Can you have a look at it? If you have: if (railway=*) then if (tunnel=no) then railway=rail [0x14 resolution 21] () { set tunnel = yes } railway=tram [0x15 resolution 21] end end This is converted (correctly) to: $tunnel=no {set mkgmap:if:2='true';} $tunnel=no & $railway=rail & $railway=* [0x14 level 2] $tunnel=no & $railway=* {set tunnel='yes';} $mkgmap:if:2=true & $railway=tram & $railway=* [0x15 level 2] But with tunnel!=no instead, this becomes: $tunnel!=no {set mkgmap:if:2='true';} $tunnel!=no & $railway=rail & $railway=* [0x14 level 2] $tunnel!=no & $railway=* {set tunnel='yes';} $mkgmap:if:2=true & $railway=tram & $railway=* [0x15 level 2] and so fails on the first statement. The only way to fix this that springs to mind is to instead convert this to: railway=* && $tunnel!=no {set mkgmap:if:2='true';} $tunnel!=no & $railway=rail & $railway=* [0x14 level 2] $tunnel!=no & $railway=* {set tunnel='yes';} $mkgmap:if:2=true & $railway=tram [0x15 level 2] Steve _______________________________________________ mkgmap-dev mailing list [email protected] http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev _______________________________________________ mkgmap-dev mailing list [email protected] http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
