Two possible bugs in docs!

new topic     » topic index » view thread      » older message » newer message

1.  This is an example program under the <seek> library routine in
library.doc

1.  =


              include file.e

              integer fn
              fn =3D open("mydata", "r")
              -- read and display first line of file 3 times:
              for i =3D 1 to 3 do
                  puts(1, gets(fn)) =

                  if seek(fn, 0) then
                      puts(1, "rewind failed!\n")
                  end if
              end for

Or is this so that the loop will be performed three times?  i is not
mentioned anywhere within the for loop.

2.  I've noticed this for a while.  This is the <atom> routine (but if th=
is
is a bug, sequence and integer have the same bug).

              line =3D gets(0)
              if atom(line) then
                  puts(SCREEN, "end of file\n")
              end if

As I understand it, atom returns a 0 or 1.  So

if atom(line) then
doesn't make sense.

--Alan
 =

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu