Conversion from VB to Cpp question

I am tasked with converting a VB probram to C.

I have came across some parts of code that seems odd to me, and since it has been more than 20 years since I have even seen Basic code I cannot remember how this works.

Here is the code:

[code]
Function CheckLeak(PresLeak As Boolean) As Boolean
Dim presrange As DruckType
Dim FixtureLeak As FixtureType
Dim HighPressure As Boolean
Dim First, Second, DeltaPressure As Double

....

CheckLeak = Not PresLeak
If CheckLeak Then

[\code]

This last part is where I am a bit confussed.

This is a function, but it is getting assigned something?

Then the function is called and the return result is evaluated, this part I get.

I have seen this assignment in many parts of this code, and in order to convert the code I need to understand what this is doing.

Thanks in advance.
[933 byte] By [bsepp] at [2007-11-20 10:53:12]
# 1 Re: Conversion from VB to Cpp question
The function will evaluate the input, and give an result (at the bottom of the function usually)

CheckLeak=True
End Function
dglienna at 2007-11-9 19:34:19 >
# 2 Re: Conversion from VB to Cpp question
The function will evaluate the input, and give an result (at the bottom of the function usually)

CheckLeak=True
End Function

So is the function actually being called again, or is the function simply saying that the evaluation is X?

I'm just confussed because to me it would be easier to just do:

*if NOT PresLeak then*

Rather than assigning the function this to evaluate.

Does this make sense to you or am I missing something?
bsepp at 2007-11-9 19:35:14 >
# 3 Re: Conversion from VB to Cpp question
Why? A suspected leak would fire the Function(when true?)
and, then it would run thru tests, and validate whether there was a leak or not.
dglienna at 2007-11-9 19:36:24 >