Compare length of two strings: Difference between revisions
Added XBasic
(Added Gambas) |
(Added XBasic) |
||
Line 893:
<pre>Igual que la entrada de FreeBASIC.
</pre>
==={{header|XBasic}}===
{{works with|Windows XBasic}}
<syntaxhighlight lang="qbasic">PROGRAM "Compare length of two strings"
VERSION "0.0000"
DECLARE FUNCTION Entry ()
DECLARE FUNCTION comp (A$, B$)
FUNCTION Entry ()
comp("abcd", "123456789")
END FUNCTION
FUNCTION comp (A$, B$)
IF LEN(A$) >= LEN(B$) THEN
PRINT A$, LEN(A$)
PRINT B$, LEN(B$)
ELSE
PRINT B$, LEN(B$)
PRINT A$, LEN(A$)
END IF
END FUNCTION
END PROGRAM</syntaxhighlight>
==={{header|Yabasic}}===
|