Msg: 4306 *Conference*

05-07-93 18:35:23

From: CARROLL LEWIS

To : RICHARD HANSON

Subj: BAR CODES AGAIN

 
  Rick,
 
  I really don't want to appear to be beating a subject into the ground,
however....necessity being a mother and all.. I have used the Tandy program as
a guide and produced this short program to generate 3 of 9 codes on an Epson
FX-80 (ultimatly to be inserted as a subroutine).
 
 1 CLS:CLEAR1000,MAXRAM:CLEAR:DEFSTRA-F:GOSUB12
 2 CLS:PRINT@45,"What would you like printed ?":PRINT@205,"(Remember ALL caps
and NO *'s)": PRINT@120,"";:INPUTE:X=LEN(E):IFX>23THENB EEP:PRINT@120,"Sorry,
the maximum is 23 characters":GOTO3ELSEGOSUB7
 3 PRINT@295,"MORE Y/n";:INPUTOK$:IFOK$="Y"OROK$="y"THEN2ELSEMENU
 4
LPRINTCHR$(27);"A";CHR$(8);:X3=42+(X*21):IFX3<256THENX1=X3:X2=0ELSEX1=X3MOD256:X
2=INT(X3/256)
 5 FORZ=1TO4:
LPRINTCHR$(27);"L";CHR$(X1);CHR$(X2):LPRINTF;:FORY=1TOX:LPRINTD(INSTR(A,MID$(E,Y
,1)));B(0);:NEXT:LPRINTF:NEXT
 6 LPRINTCHR$(27);"2";:LPRINT:RETURN
 7 FORY=1TOX:W=INSTR(A,MID$(E,Y,1)):IFWMOD42=0THENY=X+5
 8 NEXT:F=D(42)+B(0):GOSUB4:LPRINTSPACE$(2+X/2);E:RETURN
 9
DIMA(2),B(2),D(44):A(0)=STRING$(4,X):A(2)=STRING$(3,V):B(0)=STRING$(2,X):B(2)=CH
R$(V):PRINT@85,"Imagining code
for":FORS=1TOLEN(A):PRINT@104,MID$(A,S,1):READZ:T=1:Y=T:X=0:FORW=0TO7:IFZANDTTHE
NX=X+1:D(S)=D(S)+A(Y+1)ELSED(S)=D(S)+B(Y+1)
 10 Y=-Y:T=T+T:NEXT:IFX<3THEND(S)=D(S)+A(2)ELSED(S)=D(S)+B(2)
 11
NEXT:RETURN:DATA9,12,13,24,25,28,72,73,76,88,66,42,67,162,33,36,37,48,49,52,96,9
7,100,112,129,132,133,144,145,148,192,193,196,208 ,3,6,7,18,19,22,70,82,138,168
 12 A="1234567890-$.+ABCDEFGHIJKLMNOPQRSTUVWXYZ */%":X=0:V=255:GOSUB9:RETURN
 
  The program shows what's going on while loading the code images, then prompts
for what to print, faults if total code is to long (model t's will only read 23
charccters and less) and finally asks if more is wanted. Entries other than Yy
will return to Menu.  
 
  Since this is a whole program is posting OK?
 
  -Carroll-