RosettaCodeData/Task/FASTA-format/XPL0/fasta-format.xpl0

24 lines
461 B
Plaintext

proc Echo; \Echo line of characters from file to screen
int Ch;
def LF=$0A, EOF=$1A;
[loop [Ch:= ChIn(3);
case Ch of
EOF: exit;
LF: quit
other ChOut(0, Ch);
];
];
int Ch;
[FSet(FOpen("fasta.txt", 0), ^i);
loop [Ch:= ChIn(3);
if Ch = ^> then
[CrLf(0);
Echo;
Text(0, ": ");
]
else ChOut(0, Ch);
Echo;
];
]