# Re: 写档发生问题!!

Posted by 琏琏 on October 20, 1999 at 12:46:34:

In Reply to: 写档发生问题!! posted by Dai on October 19, 1999 at 16:59:18:

: 程式如下

: Dim fNum as integer

: fileNum=FreeFile
: Open "c:\test.txt" For Binary As #fileNum
: Put #fileNum,,&HA
: Close #fileNum

: 但是写进去的竟然是0D 0A??
: 写进&HD时亦同
: 有没有人了解是怎么回事啊?

你这样的语法应该写进档案有 4 个 byte
Put #fileNum,,&HA => 0D 0A 0A 00
Put #fileNum,,&HD => 0D 0A 0D 00
0D 0A 为描述器
OA 00 为短整数 = &HA
OD 00 为短整数 = &HD

- 培基语言

Follow Ups:

- 找出大概的原因了 Dai 13:50:38 10/20/99 (0)