Jump to content

Compare length of two strings: Difference between revisions

m
Line 1,228:
 
=={{header|EasyLang}}==
<syntaxhighlight lang="easylang">
proc stringLengthscmp a$ b$ . .
lineA$if = "\"" &len a$ & "\" (length: " &< len ab$ & ")"
swap a$ b$
lineB$ = "\"" & b$ & "\" (length: " & len b$ & ")"
if len a$ >= len b$
print lineA$ ; print lineB$
else
print lineB$ ; print lineA$
.
if lenprint a$ >=& " - " & len ba$
lineB$ = "\"" &print b$ & "\" (length:- " & len b$ & ")"
print ""
.
call stringLengthscmp "Easy" "Language"
call stringLengthscmp "Rosetta" "Code"
</syntaxhighlight>
{{out}}
<pre>
"Language" (length: 8)
"Easy" (length: 4)
"Rosetta" (length: 7)
"Code" (length: 4)
</pre>
 
=={{header|EMal}}==
2,063

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.