#482: t/examples/pod.t: 5 test failures
---------------------+------------------------------------------------------
Reporter: jkeenan | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: none | Version:
Severity: medium | Keywords:
Lang: | Patch:
Platform: |
---------------------+------------------------------------------------------
Comment(by mikehh):
I have found fixes for two more tests (27 and 30)
test 27 - docs/book/ch04_pir_subroutines.pod (28 in .1.log) it doesn't
like fact as a sub name - changing this to fac or factr works. It also
does not like .return p - it requires .return (p)
{{{
# factorial.pir
.sub main
.local int count
.local int product
count = 5
product = 1
$I0 = factr(count, product)
print $I0
print "\n"
end
.end
.sub factr
.param int c
.param int p
loop:
if c <= 1 goto fin
p = c * p
dec c
branch loop
fin:
.return (p)
.end
}}}
test 30 docs/book/ch04_pir_subroutines.pod (31 in .1.log) I found 3 errors
- a missing closing parens, a missing period before return and the return
parameter needs to be enclosed in parens.
{{{
# 'docs/book/ch04_pir_subroutines.pod
.sub main :main
.local int value
value = add_two(5)
say value
.end
.sub add_two
.param int value
.local int val2
val2 = add_one(value)
.tailcall add_one(val2)
.end
.sub add_one
.param int a
.local int b
b = a + 1
.return (b)
.end
}}}
I will continue working on this.
Cheers
Michael (mikehh)
--
Ticket URL: <https://trac.parrot.org/parrot/ticket/482#comment:2>
Parrot <https://trac.parrot.org/parrot/>
Parrot Development
_______________________________________________
parrot-tickets mailing list
[email protected]
http://lists.parrot.org/mailman/listinfo/parrot-tickets