On Sun, 20 Jan 2008, Ian Kelly wrote:
> Ideally, EOF should be indicated with -1 as in getchar(), but that's
> not an option here, and 0x00 is the next best thing.  Plus, it's what
> egobfi8 uses to indicate EOF by default.

Actually, when the egobfi8 interpreter reads in a -1 through getchar,
it "changes" that to a 0x00 when it inputs it into the array.  So if
you feed in the getchar() EOF of -1, you get a 0 in your bf array
which you can use to test for EOF in your bf code.  (Had to look at the 
ego code for that, it wasn't obvious).

-Goethe



Reply via email to