常见的误解:文件必须在其最终的EOF字符 [英] Common misconception : Files have an EOF char at their end

查看:129
本文介绍了常见的误解:文件必须在其最终的EOF字符的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在读卡特PC汇编语言,我看到了,这使我很困惑32页脚注这句话!

如果我们假设文件可能在他们到底有没有EOF(如书上说的)是一个正确的说法,那么我们怎么能揣摩出是文件的结束?

而且还出现了另一个问题:是否使用fseek的EOF去来回文件

I was reading "PC assembly language by Carter" and I saw this phrase in footnote of page 32 which made me so confused !
If we assume that files may have not EOF at their end (as the book says) is a correct statement, then how can we figure out where is end of a file ?
and it also arises another question : does fseek use EOF to go back and forth in file ?

推荐答案

PC => ^ Z:EOF

PC => ^Z : EOF

在奥尔德PC-天CTRL-Z是在EOF文件的信号。

in the olde PC-days the ctrl-Z was the signal in a file for EOF.

UNIX和其他现代系统下:看完stat.st_size落后之后,EOF发出信号

under UNIX and other modern systems: after reading behind the stat.st_size, EOF is signalled

这篇关于常见的误解:文件必须在其最终的EOF字符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆