Balanced brackets: Difference between revisions
Content added Content deleted
Walterpachl (talk | contribs) m (→{{header|PureBasic}}: typos) |
|||
Line 2,832: | Line 2,832: | ||
Print(TestString$) |
Print(TestString$) |
||
If Balanced(TestString$) |
If Balanced(TestString$) |
||
PrintN(" is |
PrintN(" is balanced.") |
||
Else |
Else |
||
PrintN(" is not |
PrintN(" is not balanced") |
||
EndIf |
EndIf |
||
Next</lang> |
Next</lang> |
||
Output sample |
Output sample |
||
<pre> |
|||
[] is ballanced. |
|||
[] is balanced. |
|||
[[]] is balanced. |
|||
[ |
[[[]]] is balanced. |
||
[][] |
[][]]][[ is not balanced |
||
[][][][]][ is not balanced |
|||
</pre> |
|||
=={{header|Python}}== |
=={{header|Python}}== |