To bi bilo to:
uses crt;
type id3_record = record
title, artist, album, year, comment, track, genre : string;
end;
procedure get_tag(f_name : string; var id3 : id3_record);
var i : file of byte;
x : byte;
tag : string;
begin tag := '';
assign(i,f_name);
reset(i);
seek(i,filesize(i) - 128);
repeat
read(i, x);
tag := tag + chr(x);
until eof(i);
close(i);
if copy(tag,1,3) = 'TAG' Then begin with id3 do begin
title := copy(tag,4,30);
artist := copy(tag,34,30);
album := copy(tag,64,30);
year := copy(tag,94,4);
comment := copy(tag,98,30);
if copy(comment,28,2) = '\0' then comment := copy(comment,1,28);
writeln(comment);
track := copy(tag,128,1);
genre := copy(tag,129,1);
end;
end else begin
writeln('Invalid Tag');
end;
end;
var tag : id3_Record;
begin clrscr;
get_tag('c:\3.dat',tag);
writeln(tag.title);
readln;
end.
kome nevalja zna đe su vrata