Compare length of two strings: Difference between revisions

Line 323:
{{works with|Commodore BASIC|2.0}}
{{works with|Commodore BASIC|3.5}}
<lang gwbasic>0 REM ROSETTACODE.ORG
<lang basic>
0 REM ROSETTACODE.ORG
1 REM COMPARE LENGTH OF TWO STRINGS
2 REM GIVEN TWO STRINGS OF DIFFERENT
Line 379 ⟶ 378:
1080 DATA "I LIKE TEA"
1090 DATA "WE SEE THEM EVERY WEEK"
1100 DATA "$$$"</lang>
</lang>
 
{{out}}
<pre>
*** (1) twoTWO stringsSTRINGS ***
longerLONGER stringSTRING ( 13 )
shortSHORT stringSTRING ( 12 )
 
 
*** (2) moreMORE thanTHAN 2 stringsSTRINGS***
sheSHE doesnDOESN'tT studySTUDY germanGERMAN onON mondayMONDAY ( 34
)
everyEVERY childCHILD likesLIKES anAN iceICE creamCREAM ( 30 )
theTHE courseCOURSE startsSTARTS nextNEXT sundaySUNDAY ( 29 )
doesDOES sheSHE liveLIVE inIN parisPARIS? ( 23 )
sheSHE swimsSWIMS everyEVERY morningMORNING ( 23 )
theTHE earthEARTH isIS sphericalSPHERICAL ( 22 )
weWE seeSEE themTHEM everyEVERY weekWEEK ( 22 )
heHE doesnDOESN'tT teachTEACH mathMATH ( 21 )
catsCATS hateHATE waterWATER ( 15 )
iI likeLIKE teaTEA ( 10 )
</pre>
 
Anonymous user