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

    Всего: 1

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

    +100

    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
    procedure print(RTK_select:boolean; RLK_select:boolen;MOLK_select:boolean)
    begin
         if (RTK_select and not RLK_select and not MOLK_select) then
             Excel.ActiveWorkBook.WorkSheets[1].Range['B4'] := 'РТК';
    
         if (not RTK_select and RLK_select and not MOLK_select) then
             Excel.ActiveWorkBook.WorkSheets[1].Range['B4'] := 'РЛК';
    
         if (not RTK_select and not RLK_select and MOLK_select) then
             Excel.ActiveWorkBook.WorkSheets[1].Range['B4'] := 'МОЛК';
    
         if (RTK_select and RLK_select and not MOLK_select) then
             Excel.ActiveWorkBook.WorkSheets[1].Range['B4'] := 'РТК,РЛК';
    
         if (not RTK_select and RLK_select and MOLK_select) then
             Excel.ActiveWorkBook.WorkSheets[1].Range['B4'] := 'РЛК,МОЛК';
    
         if (RTK_select and not RLK_select and  MOLK_select) then
             Excel.ActiveWorkBook.WorkSheets[1].Range['B4'] := 'РТК,МОЛК';
    
         if (RTK_select and RLK_select and  MOLK_select) then
             Excel.ActiveWorkBook.WorkSheets[1].Range['B4'] := 'РТК,РЛК,МОЛК';
    
         if (not RTK_select and not RLK_select and not MOLK_select) then
             Excel.ActiveWorkBook.WorkSheets[1].Range['B4'] := '';
    end

    Обнаружено в недрах старинного проекта. Запись строчки по флажкам.

    astamir, 19 Апреля 2013

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