› Forums › General Discussion › The MJD60K problem. › Reply To: The MJD60K problem.
25 February 2023 at 5:18 pm
#615924
Participant
It is not just a matter of storage. For instance, some years ago one of my Perl scripts contained this
my ($star, $jd, $mag);
while (<INPUT>) {
if (/^Variable\s+(.*)/) {
$star = $1 and next;
} elsif (/^(245\d+\.\d+)\tV\t(.*?)\t/) {
($jd, $mag) = ($1, $2);
$mag =~ s/\[/</ or $mag = sprintf “%.2f”, $mag;
my ($year, $month, $day) = jd2gregorian ($jd + 0.5);
printf “%s\t%.3f\t%s\tLEY\n”, $star, $day, $mag;
}
}
Spot the bug.
-
This reply was modified 2 years, 8 months ago by
Dr Paul Leyland. Reason: Fix BBCode tags
-
This reply was modified 2 years, 8 months ago by
Dr Paul Leyland.
-
This reply was modified 2 years, 8 months ago by
Dr Paul Leyland.
-
This reply was modified 2 years, 8 months ago by
Dr Paul Leyland.
