30 lines
589 B
Plaintext
30 lines
589 B
Plaintext
EnableExplicit
|
|
Define Hdl_File.i,
|
|
Frm_File.i,
|
|
c.c,
|
|
header.b
|
|
|
|
Hdl_File=ReadFile(#PB_Any,"c:\code_pb\rosettacode\data\FASTA_TEST.txt")
|
|
If Not IsFile(Hdl_File) : End -1 : EndIf
|
|
Frm_File=ReadStringFormat(Hdl_File)
|
|
|
|
If OpenConsole("FASTA format")
|
|
While Not Eof(Hdl_File)
|
|
c=ReadCharacter(Hdl_File,Frm_File)
|
|
Select c
|
|
Case '>'
|
|
header=#True
|
|
PrintN("")
|
|
Case #LF, #CR
|
|
If header
|
|
Print(": ")
|
|
header=#False
|
|
EndIf
|
|
Default
|
|
Print(Chr(c))
|
|
EndSelect
|
|
Wend
|
|
CloseFile(Hdl_File)
|
|
Input()
|
|
EndIf
|