-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAst_star.pas
64 lines (54 loc) · 1.2 KB
/
Ast_star.pas
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
Unit Ast_star;
{$MODE Delphi}
interface
uses
LCLIntf, LCLType, LMessages, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls,AST_FIC,
AST_GEN,
AST_SUN,
ast_moon,
ast_plan;
Procedure ConversionBright;
Implementation
Procedure ConversionBright;
var
n : integer;
fdat : file of Bright_cat;
vdat : Bright_cat;
ftext: text;
chaine : string;
erreur : integer;
valeur : real;
chaine2: string;
chaine3: string;
begin
assign(fdat,'brightca.dat');
rewrite(fdat);
assign(ftext,'bright.dat');
reset(ftext);
n:=1;
while not eof(ftext) do
begin
readln(ftext,chaine);
with vdat do
begin
numero:=n;
val(copy(chaine,1,8),valeur,erreur);
heuredecmin(valeur,ad);
val(copy(chaine,10,8),delta,erreur);
val(copy(chaine,19,5),Magnitude,erreur);
val(copy(chaine,25,5),Magnitude_abs,erreur);
TypeStar:=copy(chaine,31,2);
val(copy(chaine,34,3),numconst,erreur);
lettgrec:=copy(chaine,38,4);
nomconst:=copy(chaine,43,3);
libelle:=copy(chaine,47,25);
write(fdat,vdat);
inc(n);
end;
end;
close(fdat);
closefile(ftext);
MessageDlg('Conversion OK Etoiles',mtInformation, [mbOK], 0);
end;
end.