Block (programming): Difference between revisions

Content deleted Content added
Java programmers typically use a slightly different convention
VB & SQL Server use different ways of marking a block
Line 48:
</pre>
 
Visual Basic requires an explicit End statement, as follows:
 
<pre>
If x > 0 Then
 
y = y + x
 
End If
 
For i = 1 To 10
 
DoSomething(i)
 
Next ' or Next i
 
SQL Server and some other languages use Begin ... End blocks
 
IF y IS NOT NULL
BEGIN
SELECT * FROM employee WHERE name = y
END
 
</pre>
 
== See Also ==