Chinaunix首页 | 论坛 | 博客
  • 博客访问: 515050
  • 博文数量: 114
  • 博客积分: 5022
  • 博客等级: 大校
  • 技术积分: 1355
  • 用 户 组: 普通用户
  • 注册时间: 2006-08-09 18:01
文章分类

全部博文(114)

文章存档

2012年(1)

2011年(3)

2010年(1)

2009年(16)

2008年(23)

2007年(39)

2006年(31)

我的朋友

分类:

2006-09-08 19:10:16


 Common scan%
 
 On Error GoTo ERRCOMM   'HANDLE ERROR
 
'****************************
'      save to
'****************************
   sub save(s1$)
       Open "A:sv_tst.DAT" As #2 
       Field #2, 16 As s1$
       put #2
       close #2
  
   end sub
 '*********************************
 '      scan
 '*********************************
    Sub scan
       id%=0
       While 1
  Open "BAR:" as #16 CODE "A","M","N","I","K","L","H" 
  Wait 0, 3   'Wait SCAN PORT
  If Loc(#16) Then
     Beep
     id%=id%+1
     id$=str$(id%)
     s$=Input$(16,16)
     Screen 1,0
     Locate 1,3 :Print s$;
     '**************save**************
               Open "A:sv_tst.DAT" As #2 
                      Field #2, 8 as id$,16 as s$
                     
                      put #2
                      close #2
                   '********************************  
                   Close #16
         Else
     Close #16
  End If
 Wend       
       
    End Sub
'***********************************
'    Menu
'***********************************
   Sub Menu
        k$=""
        sel%=0
        scan%=0
 Cls
 while 1 
       Screen 1,1 :Locate 1,1,0 :Print "   ∞ 主 菜 单 ∞    "
       Screen 1,0
       Locate 4,3,0 :Print "1:扫描"
       Locate 13,3,0 :Print "2:出库"
      
       Screen 1,1
      
       Select k$
              Case Chr$(13) 
                   Beep
                   Select sel%
                         case 1
                                     scan%=1
                                     Exit sub
                         case 2
                                     scan%=2
                                     Exit sub
                          End Select          
              Case Chr$(49)
                   Beep
                   Locate 4,3,0 :Print "1:扫描"
                   sel%=1
                  
              Case Chr$(50)
                   Beep
                   Locate 13,3,0 :Print "2:出库"
                   sel%=2
                  
           End Select
           k$=Input$(1)
          
        Wend 
         
   End Sub
'*****************************
'         main
'*****************************
MAIN:
       Cls
       Out &H6080,1 '0:standard-size;  1:the small-size      
       Call Menu
       select scan%
            case 1
               Cls
                     Screen 1,0
                     Locate 1,1,0 :Print "扫描……"
                     Call scan
            case 2
               Cls
               While 1
                    Screen 1,0
                    Locate 1,1,0 :Print "出库"
              Wend
       End select
      
ERRCOMM:
 Cls
 Beep 8
 'Print "操作错误:"
 'Print
 'Print "按任意键重新载入";
 'Wait 0,1
 'k$=Input$(1)
 End
阅读(1331) | 评论(0) | 转发(0) |
0

上一篇:detete 删除数据

下一篇:bht8000.src

给主人留下些什么吧!~~