[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: bug in Marst assignment
From: |
Leif Harcke |
Subject: |
Re: bug in Marst assignment |
Date: |
Sun, 10 Aug 2003 21:50:10 -0700 (PDT) |
On Sun, 10 Aug 2003, Andrew Makhorin wrote:
> In fact, this is a stupid bug: the marst translator thinks that in the
> context a[i] := i; the identifier i is still the left part of the
> assignment statement (i.e. as if there were a[i] := i := ...), while it
> is a final expression in the right part.
Yes, I thought as much, as forcing the translator to treat the right hand
side as an expression by saying a[i] = (i); resolved the translator error
message.
> In order to fix the bug please insert two lines into the file marst.c
> (the version 2.4) as follows:
[...]
> After patching marst.c I tried your example, and it said to me:
> 1 2 3 4 5 6 7 8 9 10
> Correct? :+)
Right. base64 encoded version of the patch follows for those on the list
who don't want to start up the text editorĀ and patch by hand.
yours,
--
Leif Harcke
address@hidden
begin-base64 644 marst.patch
LS0tIG1hcnN0LmMub3JpZwlTdW4gQXVnIDEwIDIxOjA5OjA1IDIwMDMKKysr
IG1hcnN0LmMJU3VuIEF1ZyAxMCAyMToxMDoxMCAyMDAzCkBAIC0zMjE4LDYg
KzMyMTgsOCBAQAogICAgICAgICAgICAgICAgICAgIiBzdGF0ZW1lbnQiKTsK
ICAgICAgICAgICAgICAgIHgtPnR5cGUgPSBGX1JFQUw7CiAgICAgICAgICAg
ICB9CisgICAgICAgICAgICAvKiB4IGlzIGZpbmFsIGV4cHJlc3Npb24sIHNv
IGNsZWFyIGx2YWx1ZSBmbGFnICovCisJICAgIHgtPmx2YWwgPSAwOwogc2tp
cDM6ICAgICAgOwogICAgICAgICAgfQogICAgICAgfQo=
====