Compare length of two strings: Difference between revisions

no edit summary
No edit summary
Line 1,453:
</pre>
 
=={{header|QB64}}==
 
<lang QB64>
Dim Words(1 To 4) As String
Dim Lengths As Integer, Index As Integer, Position As Integer, Done As String, Index2 As Integer
' inititialization
Words(1) = "abcd"
Words(2) = "123456789"
Words(3) = "abcdef"
Words(4) = "1234567"
 
Print " Word Length"
For Index2 = 1 To 4 Step 1
Lengths = 0
Position = 0
For Index = 1 To 4 Step 1
If Lengths < Len(Words(Index)) And InStr(Done, Words(Index) + " ") = 0 Then
Lengths = Len(Words(Index))
Position = Index
End If
Next Index
Done = Done + Words(Position) + " /@/"
Print Words(Position), Len(Words(Position))
Next Index2
</lang>
=={{header|Quackery}}==