1. Список говнокодов пользователя niravzi

    Всего: 1

  2. Pascal / Говнокод #4657

    +95

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    11. 11
    12. 12
    13. 13
    14. 14
    15. 15
    16. 16
    17. 17
    18. 18
    19. 19
    20. 20
    21. 21
    22. 22
    23. 23
    24. 24
    25. 25
    26. 26
    27. 27
    28. 28
    29. 29
    30. 30
    31. 31
    32. 32
    33. 33
    34. 34
    35. 35
    36. 36
    37. 37
    38. 38
    39. 39
    40. 40
    41. 41
    42. 42
    43. 43
    44. 44
    45. 45
    46. 46
    function  TForm1.beta(i:integer) : integer;
    var bt:integer;
    begin
    bt:=0;
    curI:=i;
    if (alf=1) and (cad=0) then
    begin
    if i<=26 then bt:=2;
    if (i<=36) and (i>=27) then bt:=3;
    if (i<=48) and (i>=37) then  begin  bt:=1; addortolexlist(cT);  end;
    if i=49 then bt:=4;
    if i=50 then bt:=5;
    if i=51 then bt:=6;
    if i=52 then bt:=7;
    end;
    if (alf=2) and (cad=0) then
    begin
    if i<=26 then bt:=2;
    if (i<=36) and (i>=27) then bt:=2;
    end;
    if (alf=3) and (cad=0) then
    begin
    if (i<=36) and (i>=27) then bt:=3;
    end;
    if (alf=4) and (cad=0) then
    begin
    if i=50 then
    begin
     Tl[lexnow].n:=jj;
      Tl[lexnow].subst:='<>';
      Tl[lexnow].lexcod:=21;
      Tl[lexnow].index:=0;
      bt:=1;
       inc(lexnow);
       ii:=ii+1;
    end;
    if i=51 then
    begin
      Tl[lexnow].n:=jj;
      Tl[lexnow].subst:='<=';
      Tl[lexnow].lexcod:=24;
      Tl[lexnow].index:=0;
     bt:=1;
     ii:=ii+1;
        inc(lexnow);
    end;

    Кусок кода из лабораторной работы по трансляторам. Как сказал парень - "Я не умею пользоваться функциями, поэтому я все пишу на массивах" О_о
    Дальше в коде заполнение массивов размерностью в сотню элементов вручную!
    Главное, что всё работает...

    niravzi, 17 Ноября 2010

    Комментарии (1)