fredfortsonsr
Registered User.
- Local time
- Today, 19:28
- Joined
- Apr 11, 2001
- Messages
- 15
Hi,
I am reviewing the following code and the last four lines of code are confusing to me.
C(GasWork - 2) = C(GasWork - 2) + GasConc
If LowestDew(GasWork - 2) > DewPointNum Then
LowestDew(GasWork - 2) = DewPointNum
End If
If the Main Gas Symbol is "C6H14", "x" would equal "C6H" and Gas Work would equal "6".
Does C(GasWork - 2) mean C(4) or C4?
Or do I drop the C and just read it as (6-2) = (6-2) + .200 thus equaling 4.200?
Then, does LowestDew(6-2) just mean (6-2)? Then it would say:
If LowestDew(6-2) > .878 Then LowestDew(6-2) = 4
- - - - - - - - - - - - -
Counter = 0
DewPointNum = 2000
GasConc = .200
For i = 1 To 10
C(i) = 0
LowestDew(i) = 1800
Next
....
GasSymbol = GasInfo.Fields("Main Molecular Symbol")
If Mid(GasSymbol, 1, 1) = "C" And Val(Mid(GasSymbol, 2, 2)) > 3 And Mid(GasSymbol, 3, 1) <>
"+" Then
x = Mid(GasSymbol, 1, 3)
If Val(Right(x, 1)) > 0 Or Val(Right(x, 2)) = 10 Then
GasWork = Right(x, 2)
Else
GasWork = Mid(x, 2, 1)
End If
C(GasWork - 2) = C(GasWork - 2) + GasConc
If LowestDew(GasWork - 2) > DewPointNum Then
LowestDew(GasWork - 2) = DewPointNum
End If
It's a puzzle to me and any help would be appreciated.
Thanks,
Fred
I am reviewing the following code and the last four lines of code are confusing to me.
C(GasWork - 2) = C(GasWork - 2) + GasConc
If LowestDew(GasWork - 2) > DewPointNum Then
LowestDew(GasWork - 2) = DewPointNum
End If
If the Main Gas Symbol is "C6H14", "x" would equal "C6H" and Gas Work would equal "6".
Does C(GasWork - 2) mean C(4) or C4?
Or do I drop the C and just read it as (6-2) = (6-2) + .200 thus equaling 4.200?
Then, does LowestDew(6-2) just mean (6-2)? Then it would say:
If LowestDew(6-2) > .878 Then LowestDew(6-2) = 4
- - - - - - - - - - - - -
Counter = 0
DewPointNum = 2000
GasConc = .200
For i = 1 To 10
C(i) = 0
LowestDew(i) = 1800
Next
....
GasSymbol = GasInfo.Fields("Main Molecular Symbol")
If Mid(GasSymbol, 1, 1) = "C" And Val(Mid(GasSymbol, 2, 2)) > 3 And Mid(GasSymbol, 3, 1) <>
"+" Then
x = Mid(GasSymbol, 1, 3)
If Val(Right(x, 1)) > 0 Or Val(Right(x, 2)) = 10 Then
GasWork = Right(x, 2)
Else
GasWork = Mid(x, 2, 1)
End If
C(GasWork - 2) = C(GasWork - 2) + GasConc
If LowestDew(GasWork - 2) > DewPointNum Then
LowestDew(GasWork - 2) = DewPointNum
End If
It's a puzzle to me and any help would be appreciated.
Thanks,
Fred