fork download
  1. Function BarkodOlustur1(Bar12Hane:String ):String;
  2. Var
  3. tek_toplam,
  4. cift_toplam,
  5. tum_toplam,
  6. i : Integer;
  7. begin
  8. tek_toplam := 0;
  9. cift_toplam := 0;
  10. tum_toplam := 0;
  11. For i := 1 to Length(Bar12Hane) do begin
  12. If i mod 2 <> 0
  13. then tek_toplam := tek_toplam + (StrToInt(Bar12Hane[i])*1)
  14. else cift_toplam := cift_toplam + (StrToInt(Bar12Hane[i])*3);
  15. end;
  16. tum_toplam := 10 - ((tek_toplam+cift_toplam) mod 10);
  17. If tum_toplam = 10 then tum_toplam := 0;
  18. Result := Format('%d', [tum_toplam]);
  19. end;
  20.  
  21.  
  22. function BarkodOlustur2():String;
  23. var
  24. s : string;
  25. i : integer;
  26. begin
  27. s:='';
  28. for i:=1 to 12 do
  29. begin
  30. s:=s+inttostr(random(10));
  31. end;
  32. Result := S + BarkodOlustur1(s);
  33. end;
  34.  
  35.  
  36. procedure TForm1.BitBtn7Click(Sender: TObject);
  37. begin
  38. Memo1.Text:=BarkodOlustur2;
  39. end;
  40. end.
  41.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
Free Pascal Compiler version 2.2.0 [2009/11/16] for i386
Copyright (c) 1993-2007 by Florian Klaempfl
Target OS: Linux for i386
Compiling prog.pas
prog.pas(13,42) Error: Identifier not found "StrToInt"
prog.pas(14,44) Error: Identifier not found "StrToInt"
prog.pas(18,8) Error: Identifier not found "Result"
prog.pas(18,17) Error: Identifier not found "Format"
prog.pas(30,14) Error: Identifier not found "inttostr"
prog.pas(32,8) Error: Identifier not found "Result"
prog.pas(36,18) Error: Identifier not found "TForm1"
prog.pas(36,30) Error: class identifier expected
prog.pas(38,6) Error: Identifier not found "Memo1"
prog.pas(40,1) Fatal: Syntax error, "BEGIN" expected but "END" found
Fatal: Compilation aborted
Error: /usr/bin/ppc386 returned an error exitcode (normal if you did not specify a source file to be compiled)
stdout
Standard output is empty