Hi Friends,
I am using a Function from "Swiss Ephemeris" (https://www.astro.com/swisseph/swephinfo_e.htm).
Public Declare Function swe_solcross_ut Lib "swedll32.dll" _
Alias "_swe_solcross_ut@24" ( _
ByVal x2cross As Double, _
ByVal jd_ut As Double, _
ByVal iflag As Int32, _
ByVal serr As String _
) As Double ' serr must be able to hold 256 bytes
Dim Answer, Cross, JD As Double
Dim iflag As Integer
Dim serr As String = Space(256)
When this function is called, the "serr" is an Error message given by this function if there is any.
I want to display the Error message ("serr") if there is any, otherwise I want to display "No Error Message".
I tried the following but it fails.
If serr = "" Then
Console.WriteLine(" No Error Message: ")
Else
Console.WriteLine(" Error Message: " & serr)
End If
Can you please help me on this.
Thanks