Hi Rob.
I have been doing some intensive debugging and discovered a glitch in HAL's Math function.
when double quotes are used in an equation is will cause HAL's math function to work improperly.
This is what I scripted to fix the issue:
MathSentence = OriginalSentence
RidQuote = """"
If InStr(1, MathSentence, RidQuote, 1) > 0 Then MathSentence = Replace(MathSentence, RidQuote, "", 1, -1, vbTextCompare)
HMath = HalBrain.HalMath(Trim(MathSentence)) & vbCrLf
If Len(HMath) > 3 And InStr(HMath, "=)") = 0 Then
GetResponse = Trim(HMath & vbCrLf)
ShortPhrase = "" 'If Hal was to make a comment about short phrases, clear it
HalBrain.ReadOnlyMode = True
NoChoosing = True
End If
Please add this feature to your math script in HAL 7.
Here is an example of an equation that causes HAL's math to not work:
feed this to your HAL 7 bot:
What is the answer to "Add 34957 to 70764"?
and you'll see what I mean.
remove the double quotes and HAL will answer the equation as expected.
Same goes for HAL 6 versions.
P.S that equation was from a Turing Judge FYI.
Hal 7 would of failed to answer correctly or at all.
Just letting you know buddy.
Happy Holidays
Jerry