Compare length of two strings: Difference between revisions

Content added Content deleted
(→‎OCaml: add)
m (Fix spelling errors)
Line 750: Line 750:
=={{header|Forth}}==
=={{header|Forth}}==
{{works with|gforth|0.7.3}}
{{works with|gforth|0.7.3}}
Traditionaly, Forth strings are 'counted strings' (to oppose to nul terminated strings from C). So, no need to search the length, we just need to swap strings if necessary before printing.
Traditionally, Forth strings are "counted strings" (as opposed to null-terminated strings like C). So, there is no need to search the length, we just need to swap strings if necessary before printing.
<syntaxhighlight lang="Forth">
<syntaxhighlight lang="Forth">
: say dup . ." : " type ;
: say dup . ." : " type ;
Line 769: Line 769:
ok
ok
</pre>
</pre>




=={{header|Fortran}}==
=={{header|Fortran}}==