RosettaCodeData/Task/Variable-declaration-reset/Phix/variable-declaration-reset.phix
2026-02-01 16:33:20 -08:00

9 lines
185 B
Text

with javascript_semantics
sequence s = {1,2,2,3,4,4,5}
for i=1 to length(s) do
integer curr = s[i], prev
if i>1 and curr=prev then
?i
end if
prev = curr
end for