Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
29
Task/FASTA-format/PureBasic/fasta-format.basic
Normal file
29
Task/FASTA-format/PureBasic/fasta-format.basic
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
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
|
||||
Loading…
Add table
Add a link
Reference in a new issue