Skip to content

Commit

Permalink
Merge pull request #80 from africanmathsinitiative/master
Browse files Browse the repository at this point in the history
Updating Master
  • Loading branch information
Muthenya authored Jun 1, 2018
2 parents 45d822f + c5dbe16 commit 2dd4de6
Show file tree
Hide file tree
Showing 22 changed files with 2,836 additions and 1,812 deletions.
24 changes: 24 additions & 0 deletions instat/clsCondition.vb
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ Public Class Condition
Private bIsParameterValuesRFunctionNames As Boolean = False
Private bIsRSyntaxFunctionNames As Boolean = False
Private bIsRSyntaxContainsCode As Boolean = False
Private bIsRCodeRFunction As Boolean = False
Private strParameterType As String = ""
Private strParameterName As String = ""
Private lstValues As List(Of String) = New List(Of String)
Expand All @@ -42,6 +43,7 @@ Public Class Condition
bIsRSyntaxContainsCode = False
strParameterType = ""
bIsParameterValuesRFunctionNames = False
bIsRCodeRFunction = False
bIsPositive = bNewIsPositive
End Sub

Expand All @@ -56,6 +58,7 @@ Public Class Condition
bIsRSyntaxContainsCode = False
strParameterType = ""
bIsParameterValuesRFunctionNames = False
bIsRCodeRFunction = False
bIsPositive = bNewIsPositive
End Sub

Expand All @@ -74,6 +77,7 @@ Public Class Condition
bIsRSyntaxContainsCode = False
strParameterType = ""
bIsParameterValuesRFunctionNames = True
bIsRCodeRFunction = False
bIsPositive = bNewIsPositive
End Sub

Expand All @@ -95,6 +99,7 @@ Public Class Condition
bIsRSyntaxContainsCode = False
strParameterType = ""
bIsParameterValuesRFunctionNames = False
bIsRCodeRFunction = False
bIsPositive = bNewIsPositive
End Sub

Expand All @@ -107,6 +112,7 @@ Public Class Condition
bIsRSyntaxContainsCode = False
bIsParameterValuesRFunctionNames = False
strParameterName = strParamName
bIsRCodeRFunction = False
bIsPositive = bNewIsPositive
If Not {"string", "RFunction", "ROperator"}.Contains(strType) Then
MsgBox("Developer error: strType must be either string, RFunction or ROperator.")
Expand All @@ -126,6 +132,7 @@ Public Class Condition
bIsRSyntaxContainsCode = False
strParameterType = ""
bIsParameterValuesRFunctionNames = False
bIsRCodeRFunction = False
bIsPositive = bNewIsPositive
End Sub

Expand All @@ -143,6 +150,21 @@ Public Class Condition
bIsRSyntaxContainsCode = True
strParameterType = ""
bIsParameterValuesRFunctionNames = False
bIsRCodeRFunction = False
bIsPositive = bNewIsPositive
End Sub

Public Sub SetRCodeIsRFunction(Optional bNewIsPositive As Boolean = True)
lstValues = New List(Of String)
bIsFunctionNames = False
bIsParameterValues = False
bIsParameterPresent = False
bIsParameterType = False
bIsRSyntaxFunctionNames = False
bIsRSyntaxContainsCode = False
strParameterType = ""
bIsParameterValuesRFunctionNames = False
bIsRCodeRFunction = True
bIsPositive = bNewIsPositive
End Sub

Expand Down Expand Up @@ -209,6 +231,8 @@ Public Class Condition
Else
Return Not bIsPositive
End If
ElseIf bIsRCodeRFunction Then
Return (bIsPositive = (TypeOf clsRCode Is RFunction))
Else
Return True
End If
Expand Down
Loading

0 comments on commit 2dd4de6

Please sign in to comment.