On Fri, Aug 30, 2002 at 08:35:43AM +0000, [EMAIL PROTECTED] wrote: > # New Ticket Created by Leon Brocard > # Please include the string: [perl #16874] > # in the subject line of all future correspondence about this issue. > # <URL: http://rt.perl.org/rt2/Ticket/Display.html?id=16874 > > > > Hi. > > I have a weird bug where concatenation is sometimes failing, and I > have no idea why. See the attached pasm. I fully expect both works and > weird to output "foo", "bar", "quux" with various levels of spacing, > but weird doesn't output quux. > > acme@parrot parrot $ perl assemble.pl foo.pasm -o run.pbc; ./parrot run.pbc > works: [foo bar quux ] > wierd: [foo bar]
The problem seems to be in some way related to the lengths of S15 and S0 when you concat them. Either increasing the length of S15 to 1 by setting it to " " or decreasing the length of S0 to 7 ( which it is for the first case where it works ) seems to work. > Weird huh? [For future use: how would I go about debugging something > like this?] If you activate tracing ( ./parrot -t test.pbc ) you can see : wierd: [PC=50; OP=23 (print_s); ARGS=(S15="foo bar\0\0\0\0\0quux ") which I guess means that parrot is getting confussed over the length of strings at some stage and doing a concationation too late in the buffer. -- It is our business to collaboratively promote inexpensive catalysts for change as well as to globally network innovative benefits to set us apart from the competition