Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
27
Task/FASTA-format/Seed7/fasta-format.seed7
Normal file
27
Task/FASTA-format/Seed7/fasta-format.seed7
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
$ include "seed7_05.s7i";
|
||||
|
||||
const proc: main is func
|
||||
local
|
||||
var file: fastaFile is STD_NULL;
|
||||
var string: line is "";
|
||||
var boolean: first is TRUE;
|
||||
begin
|
||||
fastaFile := open("fasta_format.in", "r");
|
||||
if fastaFile <> STD_NULL then
|
||||
while hasNext(fastaFile) do
|
||||
line := getln(fastaFile);
|
||||
if startsWith(line, ">") then
|
||||
if first then
|
||||
first := FALSE;
|
||||
else
|
||||
writeln;
|
||||
end if;
|
||||
write(line[2 ..] <& ": ");
|
||||
else
|
||||
write(line);
|
||||
end if;
|
||||
end while;
|
||||
close(fastaFile);
|
||||
end if;
|
||||
writeln;
|
||||
end func;
|
||||
Loading…
Add table
Add a link
Reference in a new issue