【发布时间】:2016-02-21 05:56:44
【问题描述】:
我来这里是想走另一条路(与张贴在 echo -e equivalent in Windows?):
我有一个带有 ASCII 字符的文本文件,要转换为一个文本文件,其 ASCII 等效于文本文件中的字符。
例如。将包含“--”的文本文件更改为包含“4545”的文本文件。
谁有这方面的dos代码? 谢谢,
【问题讨论】:
-
既然是windows机器,为什么不用vbscript呢?
我来这里是想走另一条路(与张贴在 echo -e equivalent in Windows?):
我有一个带有 ASCII 字符的文本文件,要转换为一个文本文件,其 ASCII 等效于文本文件中的字符。
例如。将包含“--”的文本文件更改为包含“4545”的文本文件。
谁有这方面的dos代码? 谢谢,
【问题讨论】:
对于微软 QBasic
dim character$(1):dim number%
open "inputfile" for Binary as 1
open "outputfile" for Binary as 2
while not eof(1)
get #1,,character$:put #2,,asc(character$)
'here one byte string is converted into character number
wend
close
【讨论】: