RosettaCodeData/Task/Longest-string-challenge/BASIC256/longest-string-challenge.basic

15 lines
282 B
Plaintext

dim test = {"a", "bb", "ccc", "ddd", "ee", "f", "ggg"}
test1 = ""
for c = 0 to test[?]-1
if length(test[c]) > length(test1) Then
test1 = test[c]
test2 = test1 & chr(10)
else
if length(test[c]) = length(test1) then test2 += test[c] & chr(10)
end if
next c
print test2
end