Thread Sysopen in Kombination mit seek/sysseek und print
(12 answers)
Opened by Gast at 2007-06-25 11:09
Okay... ein wenig Nachforschung bringt die Antwort...
file.txt hat eine Größe von ca. 91080 Bytes Code: (dl
)
1 sub sys_seek { Position: 0 but true Position: 4096 Jetzt ist auch klar, warum sysseek() etwas anderes zurückgibt! readline() scheint immer 4096 Bytes zu buffern. sysseek() gibt also die Position zurück, bis zu der gebuffert wurde, also bis wohin genau die Datei schon eingelesen wurde. tell() gibt die aktuelle Position von readline() zurück, was für gewöhlich das aktuelle Zeilenende ist. Davon weiß allerdings sysseek() wenig. Deshalb ist die Vermischung von Beidem nicht so prickelnd. viele edits... sorry\n\n <!--EDIT|opi|1182857837--> What is a good module? That's hard to say.
What is good code? That's also hard to say. One man's Thing of Beauty is another's man's Evil Hack. |