[From string (line 6) ] @startuml !function $upper($a) !$len = %strlen($a) !$pos = 0 !$z = "" ... ... ( skipping 52 lines ) ... !elseif $x == "z" !$x = "Z" !endif !if %substr("-" + $a, $pos, 2) == "\n" !$x = "n" John -> Sally : I found a "\n" at position $pos! !endif !$z = $z + $x !$pos = $pos + 1 !endwhile !return $z !endfunction John -> Sally : $upper("hello") !$len = %strlen($a) !$pos = 0 !$z = "" !while ($len-$pos) > 0 ^^^^^ Parsing syntax error about $len-$pos