1
鑑於功能ASP.net - 函數中的return語句是否停止函數?
'Returns true if no cell is > 1
Function isSolutionValid() As Boolean
Dim rLoop As Integer
Dim cLoop As Integer
For cLoop = 0 To canvasCols - 1
For rLoop = 0 To canvasRows - 1
If canvas(cLoop, rLoop) > 1 Then
Return False
End If
Next
Next
Return True
End Function
當「返回false」被激發,我假設功能停止在這一點上,有沒有必要退出維權之類的東西?