Longest string challenge: Difference between revisions
Content deleted Content added
Longest string challenge en True BASIC |
Longest string challenge en BASIC |
||
Line 577: | Line 577: | ||
=={{header|BASIC}}== |
=={{header|BASIC}}== |
||
{{trans|FreeBASIC}} |
|||
{{works with|QBasic}} |
|||
<lang QBASIC> |
|||
DO |
|||
READ test$ |
|||
IF test$ = "~" THEN EXIT DO |
|||
IF LEN(test$) > LEN(test1$) THEN |
|||
test1$ = test$ |
|||
test2$ = test1$ + CHR$(10) |
|||
ELSEIF LEN(test$) = LEN(test1$) THEN |
|||
LET test2$ = test2$ + test$ + CHR$(10) |
|||
END IF |
|||
LOOP |
|||
PRINT (test2$) |
|||
DATA "a", "bb", "ccc", "ddd", "ee", "f", "ggg", "~" : ' la tilde es solo para mantener el código compacto |
|||
</lang> |
|||
{{out}} |
|||
<pre> |
|||
Igual que la entrada de FreeBASIC. |
|||
</pre> |
|||
==={{header|True BASIC}}=== |
==={{header|True BASIC}}=== |
||
{{trans|FreeBASIC}} |
{{trans|FreeBASIC}} |