DECLARE FUNCTION CODE39FA (TEKST AS STRING) AS STRING
FUNCTION CODE39FA (TEKST AS STRING) AS STRING
DIM CHAR(0 TO 127) AS STRING*2
DIM tmp AS STRING
DIM X AS INTEGER
DIM LANG AS INTEGER
DIM REP AS INTEGER
DIM UIT AS STRING
CHAR(0)="%U"
CHAR(1)="$A"
CHAR(2)="$B"
CHAR(3)="$C"
CHAR(4)="$D"
CHAR(5)="$E"
CHAR(6)="$F"
CHAR(7)="$G"
CHAR(8)="$H"
CHAR(9)="$I"
CHAR(10)="$J"
CHAR(11)="$K"
CHAR(12)="$L"
CHAR(13)="$M"
CHAR(14)="$N"
CHAR(15)="$O"
CHAR(16)="$P"
CHAR(17)="$Q"
CHAR(18)="$R"
CHAR(19)="$S"
CHAR(20)="$T"
CHAR(21)="$U"
CHAR(22)="$V"
CHAR(23)="$W"
CHAR(24)="$X"
CHAR(25)="$Y"
CHAR(26)="$Z"
CHAR(27)="%A"
CHAR(28)="%B"
CHAR(29)="%C"
CHAR(30)="%D"
CHAR(31)="%E"
CHAR(32)=" "
CHAR(33)="/A"
CHAR(34)="/B"
CHAR(35)="/C"
CHAR(36)="/D"
CHAR(37)="/E"
CHAR(38)="/F"
CHAR(39)="/G"
CHAR(40)="/H"
CHAR(41)="/I"
CHAR(42)="/J"
CHAR(43)="/K"
CHAR(44)="/L"
CHAR(45)="-"
CHAR(46)="."
CHAR(47)="/O"
CHAR(48)="0"
CHAR(49)="1"
CHAR(50)="2"
CHAR(51)="3"
CHAR(52)="4"
CHAR(53)="5"
CHAR(54)="6"
CHAR(55)="7"
CHAR(56)="8"
CHAR(57)="9"
CHAR(58)="/Z"
CHAR(59)="%F"
CHAR(60)="%G"
CHAR(61)="%H"
CHAR(62)="%I"
CHAR(63)="%J"
CHAR(64)="%V"
CHAR(65)="A"
CHAR(66)="B"
CHAR(67)="C"
CHAR(68)="D"
CHAR(69)="E"
CHAR(70)="F"
CHAR(71)="G"
CHAR(72)="H"
CHAR(73)="I"
CHAR(74)="J"
CHAR(75)="K"
CHAR(76)="L"
CHAR(77)="M"
CHAR(78)="N"
CHAR(79)="O"
CHAR(80)="P"
CHAR(81)="Q"
CHAR(82)="R"
CHAR(83)="S"
CHAR(84)="T"
CHAR(85)="U"
CHAR(86)="V"
CHAR(87)="W"
CHAR(88)="X"
CHAR(89)="Y"
CHAR(90)="Z"
CHAR(91)="%K"
CHAR(92)="%L"
CHAR(93)="%M"
CHAR(94)="%N"
CHAR(95)="%O"
CHAR(96)="%W"
CHAR(97)="+A"
CHAR(98)="+B"
CHAR(99)="+C"
CHAR(100)="+D"
CHAR(101)="+E"
CHAR(102)="+F"
CHAR(103)="+G"
CHAR(104)="H"
CHAR(105)="+I"
CHAR(106)="+J"
CHAR(107)="+K"
CHAR(108)="+L"
CHAR(109)="+M"
CHAR(110)="+N"
CHAR(111)="+O"
CHAR(112)="+P"
CHAR(113)="+Q"
CHAR(114)="+R"
CHAR(115)="+S"
CHAR(116)="+T"
CHAR(117)="+U"
CHAR(118)="+V"
CHAR(119)="+W"
CHAR(120)="+X"
CHAR(121)="+Y"
CHAR(122)="+Z"
CHAR(123)="%P"
CHAR(124)="%Q"
CHAR(125)="%R"
CHAR(126)="%S"
CHAR(127)="%T"
LANG=LEN(TEKST)
FOR X=1 TO LANG
REP=ASC(MID$(TEKST,X,1))
tmp=char(rep)
IF ASC(MID$(tmp,2,1))=32 THEN tmp=MID$(tmp,1,1)
uit=uit+tmp
NEXT X
CODE39FA=UIT
END FUNCTION
|