Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
16
Task/FASTA-format/Forth/fasta-format.fth
Normal file
16
Task/FASTA-format/Forth/fasta-format.fth
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
1024 constant max-Line
|
||||
char > constant marker
|
||||
|
||||
: read-lines begin pad max-line >r over r> swap
|
||||
read-line throw
|
||||
while pad dup c@ marker =
|
||||
if cr 1+ swap type ." : "
|
||||
else swap type
|
||||
then
|
||||
repeat drop ;
|
||||
|
||||
: Test s" ./FASTA.txt" r/o open-file throw
|
||||
read-lines
|
||||
close-file throw
|
||||
cr ;
|
||||
Test
|
||||
Loading…
Add table
Add a link
Reference in a new issue