Il y a aussi un petit bug dans la gestion du tableau:
Code : Tout sélectionner
numberofimages
Mais ensuite, il est utilisé avec un index issu d'une boucle (loop, observetill, observetillstar).
Dans le code pour les loop, qui cherche à trouver l'objet de TargetList.txt qui correspond à l'itération j de la boucle, il faut en fait ajouter un tableau IndexTargetList qui va contenir pour l'itération j de la boucle l'index de l'objet dans TargetList.txt:
Code : Tout sélectionner
REM From the star name we get the RA and Dec
FOR j=1 numberofstarsintargetlist
IF star[numberofstarsinloop]$=starname[j]$ THEN
IndexTargetList[numberofstarsinloop]=j
PRINT "Star number " numberofstarsinloop " found, it is " starname[j]$ " and index in targetlist.txt is " IndexTargetList[numberofstarsinloop]
RA[numberofstarsinloop]=starRA[j]
Dec[numberofstarsinloop]=starDec[j]
PRINT "Star RA in decimal : " RA[numberofstarsinloop] " star Dec in decimal : " Dec[numberofstarsinloop]
GOTO readloop:
ENDIF
NEXT j
Code : Tout sélectionner
numberofimages[j]
Code : Tout sélectionner
numberofimages[IndexTargetList[j]]