Possible bug in txr-185 / gather [update]

 new new list compose Reply to this message Top page
Attachments:
+ (text/plain)

Delete this message
Author: Frank Schwidom
Date:  
To: txr-users
Old topics: Nice synopsis of TXR in German.
Subject: Possible bug in txr-185 / gather [update]
Hi, I found the following :
[updated hashbang in 3rd example code]

first, this code works:

===========================
#!/bin/txr-185
@(next :list (list "a" "b"))
@(gather)
@{A /a/}
@{B /b/}
@{C /a/}
@{D /b/}
@(and)
@(line l1)
@X
@(line l2)
@(end)
@(output)
@A
@B
@C
@D

@l1
@X
@l2
@(end)
===========================

output is as expected:

===========================
a
b
a
b

1
a
2
===========================

this works too:

===========================
#!/bin/txr-185
@(next :list (list "a" "b"))
@(gather)
@{A /a/}
@;{B /b/}
@;{C /a/}
@;{D /b/}
@(and)
@(line l1)
@X
@(line l2)
@Y
@(line l3)
@(end)
@(output)
@A
@;B
@;C
@;D

@l1
@X
@l2
@Y
@l3
@(end)
===========================

output is as expected:

===========================
a

1
a
2
b
3
===========================

but the following seems not to work:

===========================
#!/bin/txr-185
@(next :list (list "a" "b"))
@; won't work
@(gather)
@{A /a/}
@{B /b/}
@{C /a/}
@{D /b/}
@(and)
@(line l1)
@X
@(line l2)
@Y
@(line l3)
@(end)
@(output)
@A
@B
@C
@D

@l1
@X
@l2
@Y
@l3
@(end)
===========================

output is not as expected:

===========================
===========================

expected output is:

===========================
a
b
a
b

1
a
2
b
3
===========================

thanks in advance
kind regards
Frank Schwidom