vb中怎样把一个文本里面的十进制转化为二进制存到另一个文本中?谢谢!

小弟刚进来,分数少了点!:)PrivateSubCommand1_Click()DimiAsDoublei=1DimkAsIntegerDimlAsIntegerDima... 小弟刚进来,分数少了点!:)
Private Sub Command1_Click()

Dim i As Double
i = 1
Dim k As Integer
Dim l As Integer
Dim ayy(7) As Single

Dim str As String
Dim paths As String
Dim paths_1 As String

Dim filefield As Long

filefield = FreeFile

paths = "d:\数据包" & "\" & Year(Text1.Text) & "_" & Month(Text1.Text) & "_" & Day(Text1.Text) & ".txt"
paths_1 = "d:\数据" & "\" & "data_sum" '

Open paths For Binary As #1

Open paths_1 For Binary As #filefield

Do While Not EOF(1)
Line Input #1, str

arr = Split(str, ",")

Put #filefield, , CSng(arr(1)) & " " & CSng(arr(2)) & " " & CSng(arr(3)) & " " & CSng(arr(4)) & " " & CSng(arr(5)) & " " & CSng(arr(6)) & " " & CSng(arr(7))

Loop

Close #1
Close #2

End Sub

运行后老提示文件已经打开!
展开
 我来答
ihss23
2007-04-09 · TA获得超过701个赞
知道小有建树答主
回答量:1472
采纳率:0%
帮助的人:1337万
展开全部
文件已经打开,那你就应该先关闭了再开.
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式