分享

VFB_演示如何使用输入语句从文件中分析和检索数据

 nxhujiee 2020-07-09
'' This example demonstrates how the Input statement can be used to parse and
'' retrieve data from file.
''此示例演示如何使用输入语句从文件中分析和检索数据。
Sub doinputByRef file As String )
    
Dim As Integer i
    Dim As Double f
    Dim As String s
    Open file For Input As #1
    Input #1, s
    Print s
    Input #1, i, f, s
    Print i, f, s
    Close #1
End Sub
'' Create test data file...
Open "test.datFor OutPut As #1
Print #1, "abc def"
Print #1, 1234, 5678.901, "xyz zzz"
Close #1
'' Read it in
doinput "test.dat"
Sleep 

    本站是提供个人知识管理的网络存储空间,所有内容均由用户发布,不代表本站观点。请注意甄别内容中的联系方式、诱导购买等信息,谨防诈骗。如发现有害或侵权内容,请点击一键举报。
    转藏 分享 献花(0

    0条评论

    发表

    请遵守用户 评论公约

    类似文章 更多