Guidance
指路人
g.yi.org
software / rapidq / Examples / Graphics & Animation / barcode / barcode / Code39fa / C39.INC

Register 
注册
Search 搜索
首页 
Home Home
Software
Upload

  
     DECLARE FUNCTION code39(tekstin AS STRING) AS STRING


     FUNCTION code39(tekstin AS STRING) AS STRING
'
'           CODE 39
'   -----------------------------------------------------------
'   inizialize VAR`S
'
      DIM bcode(0 TO 58) AS STRING*13  ' ARRAY with bitpatterns STRING`S
      DIM TEKST AS STRING              ' BARCODE TEXT
      DIM BITMAP AS STRING             ' 0/1 white/black string
      DIM x AS INTEGER
      DIM barlengte AS INTEGER
'   -----------------------------------------------------------
'
'   TABEL from  http://www.barcodeisland.com
'      ascii  032
      BCode(0) = "1001101011010" '   SPACE
      BCode(1) = ""  'not supported    !
      BCode(2) = ""  'not supported    "
      BCode(3) = ""  'not supported    #
      BCode(4) = "1001001001010" '     $
      BCode(5) = "1010010010010" '     %
      BCode(6) = ""  'not supported    &
      BCode(7) = ""  'not supported    '
      BCode(8) = ""  'not supported    (
      BCode(9) = ""  'not supported    )
      BCode(10) = "1001011011010" '    *       START  , STOP
      BCode(11) = "1001010010010" '    +
      BCode(12) = ""  'not supported   ,
      BCode(13) = "1001010110110" '    -
      BCode(14) = "1100101011010" '    .
      BCode(15) = "1001001010010" '    /
      BCode(16) = "1010011011010" '    0
      BCode(17) = "1101001010110" '    1
      BCode(18) = "1011001010110" '    2
      BCode(19) = "1101100101010" '    3
      BCode(20) = "1010011010110" '    4
      BCode(21) = "1101001101010" '    5
      BCode(22) = "1011001101010" '    6
      BCode(23) = "1010010110110" '    7
      BCode(24) = "1101001011010" '    8
      BCode(25) = "1011001011010" '    9
      BCode(26) = ""  'not supported   :
      BCode(27) = ""  'not supported   ;
      BCode(28) = ""  'not supported   <
      BCode(29) = ""  'not supported   =
      BCode(30) = ""  'not supported   >
      BCode(31) = ""  'not supported   ?
      BCode(32) = ""  'not supported   @
      BCode(33) = "1101010010110" '    A
      BCode(34) = "1011010010110" '    B
      BCode(35) = "1101101001010" '    C
      BCode(36) = "1010110010110" '    D
      BCode(37) = "1101011001010" '    E
      BCode(38) = "1011011001010" '    F
      BCode(39) = "1010100110110" '    G
      BCode(40) = "1101010011010" '    H
      BCode(41) = "1011010011010" '    I
      BCode(42) = "1010110011010" '    J
      BCode(43) = "1101010100110" '    K
      BCode(44) = "1011010100110" '    L
      BCode(45) = "1101101010010" '    M
      BCode(46) = "1010110100110" '    N
      BCode(47) = "1101011010010" '    O
      BCode(48) = "1011011010010" '    P
      BCode(49) = "1010101100110" '    Q
      BCode(50) = "1101010110010" '    R
      BCode(51) = "1011010110010" '    S
      BCode(52) = "1010110110010" '    T
      BCode(52) = "1100101010110" '    U
      BCode(54) = "1001101010110" '    V
      BCode(55) = "1100110101010" '    W
      BCode(56) = "1001011010110" '    X
      BCode(57) = "1100101101010" '    Y
      BCode(58) = "1001101101010" '    Z
'      ascii  090
'
'   --------------------------------------------------------------
'   make 0/1 string for later bitmap conversion

'   code39= "*"+TEXTIN +"*"    start+tekst+stop
      TEKST = "*"+tekstin+"*"

      barlengte=LEN(tekst)

      FOR x = 1 TO barlengte
       barchar=ASC(MID$(tekst,x,1))-32
       BITMAP=BITMAP+BCODE(BARCHAR)
      NEXT x

      code39=BITMAP

     END FUNCTION
'-----------------------------------------------------------------














掌柜推荐
 
 
¥1,800.00 ·
 
 
¥489.00 ·
 
 
¥288.00 ·
 
 
¥908.00 ·
 
 
¥748.00 ·
 
 
¥264.00 ·
© Sun 2024-11-24  Guidance Laboratory Inc.
Email:webmaster1g.yi.org Hits:0 Last modified:2013-06-19 07:58:38