Compare length of two strings: Difference between revisions

Added MSX Basic
(Added Chipmunk Basic)
(Added MSX Basic)
Line 789:
End of program execution.
</pre>
 
==={{header|MSX Basic}}===
{{works with|MSX BASIC|any}}
{{works with|PC-BASIC|any}}
{{works with|BASICA}}
{{works with|Chipmunk Basic}}
{{works with|QBasic}}
{{works with|True BASIC}}
{{works with|Just BASIC}}
{{trans|True BASIC}}
<syntaxhighlight lang="qbasic">100 LET A$ = "abcd"
110 LET B$ = "123456789"
120 GOSUB 140
130 END
140 REM SUB comp(A$, B$)
150 IF LEN(A$) >= LEN(B$) THEN PRINT A$,LEN(A$) : PRINT B$,LEN(B$)
180 IF LEN(A$) < LEN(B$) THEN PRINT B$,LEN(B$) : PRINT A$,LEN(A$)
220 RETURN</syntaxhighlight>
 
==={{header|PureBasic}}===
2,169

edits