Compare length of two strings: Difference between revisions
Content added Content deleted
Line 1,229: | Line 1,229: | ||
=={{header|EasyLang}}== |
=={{header|EasyLang}}== |
||
<syntaxhighlight lang="easylang"> |
<syntaxhighlight lang="easylang"> |
||
proc |
proc scmp a$ b$ . . |
||
if len a$ < len b$ |
|||
swap a$ b$ |
|||
⚫ | |||
⚫ | |||
print lineA$ ; print lineB$ |
|||
else |
|||
print lineB$ ; print lineA$ |
|||
. |
. |
||
⚫ | |||
⚫ | |||
print "" |
|||
. |
. |
||
scmp "Easy" "Language" |
|||
scmp "Rosetta" "Code" |
|||
</syntaxhighlight> |
</syntaxhighlight> |
||
{{out}} |
|||
<pre> |
|||
"Language" (length: 8) |
|||
"Easy" (length: 4) |
|||
"Rosetta" (length: 7) |
|||
"Code" (length: 4) |
|||
</pre> |
|||
=={{header|EMal}}== |
=={{header|EMal}}== |