Empty string: Difference between revisions

no edit summary
No edit summary
Line 645:
if len(s) > 0 then print "String not empty."
</lang>
 
=={{header|Gambas}}==
<lang gambas>Public Sub Form_Open()
Dim sString As String[] = ["", "Hello", "world", "", "Today", "Tomorrow", "", "", "End!"]
Dim sTemp As String
Dim siCount As Short
 
For Each sTemp In sString
If sString[siCount] Then
Print "String " & siCount & " = " & sString[siCount]
Else
Print "String " & siCount & " is empty"
End If
Inc siCount
Next
 
End</lang>
Output:
<pre>
String 0 is empty
String 1 = Hello
String 2 = world
String 3 is empty
String 4 = Today
String 5 = Tomorrow
String 6 is empty
String 7 is empty
String 8 = End!
</pre>
 
=={{header|Go}}==
Anonymous user