Path: csiph.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Stefan Dietl Newsgroups: comp.lang.clipper.visual-objects Subject: Re: Code128 with font [solved] Date: Tue, 9 Jan 2018 08:51:13 +0100 Lines: 22 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: individual.net s7f5UGC6VzFOnlQk/3GoCQONm37HHfRCKyy1x+JApzyY5dg9A3 Cancel-Lock: sha1:UMnL2xa8w1nprqOF/1rhJ0F4lyk= User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 In-Reply-To: Content-Language: de-DE Xref: csiph.com comp.lang.clipper.visual-objects:11275 Info from here: http://www.jtbarton.com/Barcodes/Code128.aspx#FreeCode128 FUNCTION Code128( ccode AS STRING ) AS STRING PASCAL LOCAL i, nlen AS DWORD LOCAL cret, cx AS STRING LOCAL nCodeX, nSum AS DWORD nCodeX := 104 //B:104, A:103, C:105 nSum := nCodeX cret := CHR(nCodeX+100) nlen := SLen(ccode) FOR i := 1 UPTO nlen cx := SubStr3(ccode,i,1) nSum += ((Asc(cx)-32)*i) cret += cx NEXT cret += CHR( (nSum % 103)+32 ) cret += CHR( 206 ) RETURN cret