FASTA format: Difference between revisions
Content added Content deleted
m (→{{header|Phix}}: added syntax colouring the hard way) |
No edit summary |
||
Line 507: | Line 507: | ||
Rosetta_Example_1: THERECANBENOSPACE |
Rosetta_Example_1: THERECANBENOSPACE |
||
Rosetta_Example_2: THERECANBESEVERALLINESBUTTHEYALLMUSTBECONCATENATED |
Rosetta_Example_2: THERECANBESEVERALLINESBUTTHEYALLMUSTBECONCATENATED |
||
⚫ | |||
=={{header|Forth}}== |
|||
Developed with gforth 0.7.9 |
|||
<lang forth>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 |
|||
</lang> |
|||
{{out}} |
|||
<pre> |
|||
⚫ | |||
Rosetta_Example_2 : THERECANBESEVERALLINESBUTTHEYALLMUSTBECONCATENATED |
|||
</pre> |
</pre> |
||
Line 575: | Line 600: | ||
End</lang> |
End</lang> |
||
Output: |
Output: |
||
<pre>Rosetta_Example_1: THERECANBENOSPACE |
|||
⚫ | |||
⚫ | |||
Rosetta_Example_2: THERECANBESEVERALLINESBUTTHEYALLMUSTBECONCATENATED |
Rosetta_Example_2: THERECANBESEVERALLINESBUTTHEYALLMUSTBECONCATENATED |
||
</pre> |
</pre> |