39 lines
629 B
Plaintext
39 lines
629 B
Plaintext
Return of boolean literal statements wrapped into ``++If-Then-Else++`` ones should be simplified.
|
|
|
|
== Noncompliant Code Example
|
|
|
|
[source,vb6]
|
|
----
|
|
Function MyFunction
|
|
If condition Then
|
|
MyFunction = True
|
|
Else
|
|
MyFunction = False
|
|
End If
|
|
End Function
|
|
----
|
|
|
|
== Compliant Solution
|
|
|
|
[source,vb6]
|
|
----
|
|
Function MyFunction
|
|
MyFunction = condition
|
|
End Function
|
|
----
|
|
|
|
ifdef::env-github,rspecator-view[]
|
|
|
|
'''
|
|
== Implementation Specification
|
|
(visible only on this page)
|
|
|
|
include::../message.adoc[]
|
|
|
|
'''
|
|
== Comments And Links
|
|
(visible only on this page)
|
|
|
|
include::../comments-and-links.adoc[]
|
|
endif::env-github,rspecator-view[]
|