Author Topic: gethoroscopetime  (Read 364 times)

0 Members and 1 Guest are viewing this topic.

KylePierce

  • Newbie
  • *
  • Posts: 14
    • View Profile
gethoroscopetime
« on: April 15, 2021, 09:53:29 PM »
Jean, are there any changes that could have affected the gethoroscopetime() function? I'm very recently seeing bad data returned by this call. It's returning year = 0 and JD equivalent to that (see attached). I can go back to an earlier version of pd.exe and then it works as expected.

Let me know how else I can be of help with this.

Jean

  • Administrator
  • Sr. Member
  • *****
  • Posts: 373
    • View Profile
Re: gethoroscopetime
« Reply #1 on: April 16, 2021, 07:36:17 AM »
No nothing has changed. In this case it seems to me that endyearstr contains 0.
There is something strange though, in line 587 you set time[1] to 1, but the debugger shows it as 6. So i'm not sure about that debugger window.
I'm attaching julian.ab which i use to convert between julian and time, it may be useful, just enter either a date or a julian number and the other field will display the other.
Greetings from Groningen Netherlands <)))><.`.><(((>

KylePierce

  • Newbie
  • *
  • Posts: 14
    • View Profile
Re: gethoroscopetime
« Reply #2 on: April 20, 2021, 02:02:16 AM »
Thanks Jean, it turns out the problem was with one or more strstr() calls that I changed to strchr() calls and then it worked. I think strchr() is best when searching for a single char. Can't say exactly why it used to work, but now it works better. I will send an updated coincidings.ab.

Jean

  • Administrator
  • Sr. Member
  • *****
  • Posts: 373
    • View Profile
Re: gethoroscopetime
« Reply #3 on: April 20, 2021, 08:12:25 AM »
It turns out i made a mistake in strstr(). When flag = 0, it only returns 1 or -1, not the place the string was found.
There's another script using strstr which is not by me, so before fixing i have to contact that author.
I published your script.
Greetings from Groningen Netherlands <)))><.`.><(((>

KylePierce

  • Newbie
  • *
  • Posts: 14
    • View Profile
Re: gethoroscopetime
« Reply #4 on: April 20, 2021, 04:43:32 PM »
Thanks, Jean.