unit Ucode39;

interface
uses Windows, Sysutils, Dialogs;
procedure Construction_Code39;

var
      Chaine39    : string;
      Code39      : string;

implementation

const
      MCode39      : string = '';

procedure Construction_Code39;
var  car            : char;
     i              : integer;
     interdit       : byte;
begin
     interdit       := 0;
     Code39         := '';

     if (Chaine39>'') then
        begin for i:=1 to length(Chaine39) do begin car := Chaine39 [i];
                                                    if (car=char(32)) or (car=char(36)) or (car=char(37)) or (car=char(43)) or
                                                       ((car>=char(45)) and (car<=char(57))) or ((car>=char(64)) and (car<=char(90)))  then continue else begin interdit:=ord(car); break; end;
                                              end;
              if interdit=0 then Code39 := '*' + chaine39 + '*';
        end;
end;

end.
