So I posted this before, but got no answer. I found a way around it but now my backway is doing the same problem.
Basically, in one of my get methods:
When I run the program, I give pH a value of 1488. But when it comes to retrieving that value the compiler goes nuts. If I run the program, I get "Error 6: Overflow". So I use the debugger, I step through the WHOLE program... and it completes its run with no issue.... so I run again... and get the error. I find out it is when I retrieve the H value. So I put a break right there. I run program to the break and then step through the retrieval and find something quite odd. When it gets to the
it actually returns true... but pH has a value of 1488! so I do this again and mouse over the pH to see what it says and it says "pH = 0" thats odd... I hit F8 to step. then mouse over pH, still "pH = 0" I open up the locals window and locate the pH variable. it says "pH = 1488", I mouse over pH again and now it says "pH = 1488" BUT IT JUST PASSED AN IF STATEMENT SAYING IF<=0!!!! please help!
Screenshots (in order):
#1
#2
#3
#4
#5
#6
#7
Basically, in one of my get methods:
Code:
Property Get H() As Double H = CalcH 'This was implemented as the "Back Way" and it fixed problem, before the code in CalcH was in here End Property Private Function CalcH() As Double If pH <= 0# And pT > 0# And pP > 0# Then 'calculate if not set pH = STMPTH(pP, pT) ElseIf pH <= 0# And pT > 0# Then If pType = StreamType.Water Then pH = STMTQH(pT, 0#) Else pH = STMTQH(pT, 1#) End If ElseIf pH <= 0# And pP > 0# Then If pType = StreamType.Water Then pH = STMPQH(pP, 0#) Else pH = STMPQH(pP, 1#) End If End If CalcH = pH End Function
Code:
If pH <= 0# And pT > 0# And pP > 0# Then 'calculate if not set
Screenshots (in order):
#1
#2
#3
#4
#5
#6
#7
Comment