Школоло / Говнокод #234 Ссылка на оригинал

0

  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6
  7. 7
  8. 8
  9. 9
  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
  47. 47
  48. 48
  49. 49
  50. 50
  51. 51
  52. 52
  53. 53
  54. 54
  55. 55
  56. 56
  57. 57
  58. 58
  59. 59
  60. 60
  61. 61
  62. 62
  63. 63
  64. 64
  65. 65
for J1:=0 to Length(wArTypCoil[JJ])-1 do begin
      with wArTypCoil[JJ][J1] do begin
       with cTyp_coil do begin NRow:=J1+1;NTab:=II_Tabl+4; Itm5:=II;StrN:=2230;mEd:=true;Lev:=2;end;P5;ArP5[IJ5]:<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="e4d9a487b09d94">[email protected]</a>_coil;inc(IJ5);inc(II);
       with cD_in do begin NRow:=J1+1;NTab:=II_Tabl+4; Itm1:=II; StrN:=2231;mEd:=true;NPos:=1;Lev:=2;end;P1;ArP1[IJ1]:<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="437e032007">[email protected]</a>_in;inc(IJ1);inc(II);
       with cTyp_pr do begin NRow:=J1+1;NTab:=II_Tabl+4; Itm6:=II;NTypChs1:=1;StrN:=2232;mEd:=true;Lev:=2;end;P6;ArP6[IJ6]:<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="d4e994b780ada4">[email protected]</a>_Pr;inc(IJ6);inc(II);
       with cRad_str do begin NRow:=J1+1;NTab:=II_Tabl+4; Itm5:=II; StrN:=2233;mEd:=true;Lev:=2;end;P5;ArP5[IJ5]:<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="fec3be9dac9f9a">[email protected]</a>_str;inc(IJ5);inc(II);
       with cPW_coil_rad do begin NRow:=J1+1;NTab:=II_Tabl+4; Itm2:=II; StrN:=2235;mEd:=true;Lev:=2;end;P2;ArP2[IJ2]:<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="2914694a797e">[email protected]</a>_coil_rad;inc(IJ2);inc(II);
       with cPW_coil_os do begin NRow:=J1+1;NTab:=II_Tabl+4; Itm2:=II; StrN:=2248;mEd:=true;Lev:=2;end;P2;ArP2[IJ2]:<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="e1dca182b1b6">[email protected]</a>_coil_os;inc(IJ2);inc(II);
       with cRat_cur do begin NRow:=J1+1;NTab:=II_Tabl+4; Itm1:=II; StrN:=2236;mEd:=true;NPos:=2;Lev:=2;end;P1;ArP1[IJ1]:<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="a994e9cafbc8dd">[email protected]</a>_cur;inc(IJ1);inc(II);
       with cTrn_coil do begin NRow:=J1+1;NTab:=II_Tabl+4; Itm1:=II; StrN:=2237;mEd:=true;NPos:=3;Lev:=2;end;P1;ArP1[IJ1]:<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="4875082b1c3a26">[email protected]</a>_coil;inc(IJ1);inc(II);
       with cRad_dim do begin NRow:=J1+1;NTab:=II_Tabl+4; Itm1:=II; StrN:=2271;mEd:=true;NPos:=3;Lev:=2;end;P1;ArP1[IJ1]:<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="d7ea97b485b6b3">[email protected]</a>_dim;inc(IJ1);inc(II);
       //...
      end;
     end;
     with wArNconcentr[JJ] do begin NRow:=1;NTab:=II_Tabl+1; Itm2:=II; StrN:=2279;mEd:=false;Lev:=1;end;P2;ArP2[IJ2]:<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="4479043305360a272b2a27212a3036">[email protected]</a>[JJ];inc(IJ2);inc(II);
     with wArM_c[JJ] do begin NRow:=1;NTab:=II_Tabl+1; Itm3:=II; StrN:=2316;mEd:=true;NPos:=0;Lev:=1;end;P3;ArP3[IJ3]:<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="d9e499ae98ab94">[email protected]</a>_c[JJ];inc(IJ3);inc(II);
 //    with wArNumZoneOtvod_c[JJ] do begin NTab:=II_Tabl+1; Itm3:=II; StrN:=2317;mEd:=true;NPos:=0;Lev:=1;end;P3;ArP3[IJ3]:<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="d3ee93a492a19da6be89bcbdb69ca7a5bcb7">[email protected]</a>_c[JJ];inc(IJ3);inc(II);
 //    with wArNumZoneVdod_c[JJ] do begin NTab:=II_Tabl+1; Itm3:=II; StrN:=2318;mEd:=true;NPos:=0;Lev:=1;end;P3;ArP3[IJ3]:<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="615c211620132f140c3b0e0f0437050e05">[email protected]</a>_c[JJ];inc(IJ3);inc(II);
 //    with wArNxod_c[JJ] do begin NTab:=II_Tabl+1; Itm3:=II; StrN:=2319;mEd:=true;NPos:=0;Lev:=1;end;P3;ArP3[IJ3]:<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="e2dfa295a390ac9a8d86">[email protected]</a>_c[JJ];inc(IJ3);inc(II);
 //    with wArNcur_c[JJ] do begin NTab:=II_Tabl+1; Itm3:=II; StrN:=2320;mEd:=true;NPos:=0;Lev:=1;end;P3;ArP3[IJ3]:<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="605d201721122e031512">[email protected]</a>_c[JJ];inc(IJ3);inc(II);
 //    with wArParam_c[JJ] do begin NTab:=II_Tabl+1; Itm3:=II; StrN:=2321;mEd:=true;NPos:=0;Lev:=1;end;P3;ArP3[IJ3]:<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="8eb3cef9cffcdeeffcefe3">[email protected]</a>_c[JJ];inc(IJ3);inc(II);
 //    with wArSw_c[JJ] do begin NTab:=II_Tabl+1; Itm3:=II; StrN:=2322;mEd:=true;NPos:=1;Lev:=1;end;P3;ArP3[IJ3]:<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="87bac7f0c6f5d4f0">[email protected]</a>_c[JJ];inc(IJ3);inc(II);
     with wArNumKolc_top_c[JJ] do begin NRow:=1;NTab:=II_Tabl+1; ; Itm3:=II; StrN:=2328;mEd:=true;NPos:=0;Lev:=1;end;P3;ArP3[IJ3]:<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="fbc6bb8cba89b58e96b0949798">[email protected]</a>_top_c[JJ];inc(IJ3);inc(II);
     with wArNumKolc_bot_c[JJ] do begin NRow:=1;NTab:=II_Tabl+1; Itm3:=II; StrN:=2329;mEd:=true;NPos:=0;Lev:=1;end;P3;ArP3[IJ3]:<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="d4e994a395a69aa1b99fbbb8b7">[email protected]</a>_bot_c[JJ];inc(IJ3);inc(II);
     with wArNreek_ar[JJ] do begin NRow:=1;NTab:=II_Tabl+3; Itm3:=II; StrN:=2313;mEd:=true;NPos:=0;Lev:=1;end;P3;ArP3[IJ3]:<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="1825586f596a566a7d7d73">[email protected]</a>_ar[JJ];inc(IJ3);inc(II);
     with wArGshreik_ar[JJ] do begin NRow:=1;NTab:=II_Tabl+3; Itm3:=II; StrN:=2314;mEd:=true;NPos:=2;Lev:=1;end;P3;ArP3[IJ3]:<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="f6cbb681b784b1859e84939f9d">[email protected]</a>_ar[JJ];inc(IJ3);inc(II);
     with wArGtreik_ar[JJ] do begin NRow:=1;NTab:=II_Tabl+3; Itm3:=II; StrN:=2315;mEd:=true;NPos:=2;Lev:=1;end;P3;ArP3[IJ3]:<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="4875083f093a0f3c3a2d2123">[email protected]</a>_ar[JJ];inc(IJ3);inc(II);
     with wArShreik_ar[JJ] do begin NRow:=1;NTab:=II_Tabl+3; Itm3:=II; StrN:=2404;mEd:=true;NPos:=2;Lev:=1;end;P3;ArP3[IJ3]:<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="6b562b1c2a193803190e0200">[email protected]</a>_ar[JJ];inc(IJ3);inc(II);
     with wArNpr[JJ] do begin NRow:=1;NTab:=II_Tabl+3; Itm2:=II; StrN:=2369;mEd:=true;Lev:=1;end;P2;ArP2[IJ2]:<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="4875083f093a06383a">[email protected]</a>[JJ];inc(IJ2);inc(II);
     with wArShpr[JJ] do begin NRow:=1;NTab:=II_Tabl+3; Itm1:=II; StrN:=2245;mEd:=true;NPos:=2;Lev:=1;end;P1;ArP1[IJ1]:<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="320f72457340615a4240">[email protected]</a>[JJ];inc(IJ1);inc(II);

     with wArRadZaz_w[JJ] do begin NRow:=1;NTab:=II_Tabl+1; Itm3:=II; StrN:=2323;mEd:=true;NPos:=2;Lev:=1;end;P3;ArP3[IJ3]:<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="7449340335062615102e150e">[email protected]</a>_w[JJ];inc(IJ3);inc(II);
     with wArStr_os_w[JJ] do begin NRow:=1;NTab:=II_Tabl+1; Itm1:=II; StrN:=2324;mEd:=true;NPos:=2;Lev:=1;end;P1;ArP1[IJ1]:<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="e2dfa295a390b19690">[email protected]</a>_os_w[JJ];inc(IJ1);inc(II);
     with wArPrizn_radop_w[JJ] do begin NRow:=1;NTab:=II_Tabl+1; Itm4:=II;NTypChs:=0;StrN:=2325;mEd:=true;Lev:=1;end;P4;ArP4[IJ4]:<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="734e3304320123011a091d">[email protected]</a>_radop_w[JJ];inc(IJ4);inc(II);

     with wArAxStr[JJ].awAxialStr do begin NRow:=1;NTab:=II_Tabl+5; Itm5:=II; StrN:=2243;mEd:=true;Lev:=1;end;P5;ArP5[IJ5]:<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="340974437546754c674046">[email protected]</a>[JJ].awAxialStr;inc(IJ5);inc(II);
     with wArYokeRast_bot_w[JJ] do begin NRow:=1;NTab:=II_Tabl+2; Itm1:=II; StrN:=2265;mEd:=true;NPos:=2;Lev:=1;end;P1;ArP1[IJ1]:<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="95a8d5e2d4e7ccfafef0c7f4e6e1">[email protected]</a>_bot_w[JJ];inc(IJ1);inc(II);
     with wArElectrH_w[JJ] do begin NRow:=1;NTab:=II_Tabl+2; Itm1:=II; StrN:=2266;mEd:=true;NPos:=2;Lev:=1;end;P1;ArP1[IJ1]:<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="9aa7daeddbe8dff6fff9eee8d2">[email protected]</a>_w[JJ];inc(IJ1);inc(II);
     with wArElectr_centre[JJ] do begin NRow:=1;NTab:=II_Tabl+2; Itm1:=II; StrN:=2395;mEd:=false;NPos:=1;Lev:=1;end;P1;ArP1[IJ1]:<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="1825586f596a5d747d7b6c6a">[email protected]</a>_centre[JJ];inc(IJ1);inc(II);
     with wArKanBottom[JJ] do begin NRow:=1;NTab:=II_Tabl+2; Itm3:=II; StrN:=2341;mEd:=true;NPos:=2;Lev:=1;end;P3;ArP3[IJ3]:<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="d8e598af99aa93b9b69ab7acacb7b5">[email protected]</a>[JJ];inc(IJ3);inc(II);
     with wArKanTop[JJ] do begin NRow:=1;NTab:=II_Tabl+2; Itm3:=II; StrN:=2342;mEd:=true;NPos:=2;Lev:=1;end;P3;ArP3[IJ3]:<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="6e532e192f1c250f003a011e">[email protected]</a>[JJ];inc(IJ3);inc(II);

     with wArComIsZone[JJ] do begin NRow:=1;NTab:=II_Tabl+6; Itm1:=II; StrN:=2339;mEd:=true;NPos:=2;Lev:=1;end;P1;ArP1[IJ1]:<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="162b5661576455797b5f654c797873">[email protected]</a>[JJ];inc(IJ1);inc(II);
     with wArMprIsZone[JJ] do begin NRow:=1;NTab:=II_Tabl+6; Itm1:=II; StrN:=2340;mEd:=true;NPos:=2;Lev:=1;end;P1;ArP1[IJ1]:<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="013c417640734c717348725b6e6f64">[email protected]</a>[JJ];inc(IJ1);inc(II);
     with wArKus_pr[JJ] do begin NRow:=1;NTab:=II_Tabl+7; Itm1:=II; StrN:=2249;mEd:=true;NPos:=3;Lev:=1;end;P1;ArP1[IJ1]:<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="4f720f380e3d043a3c">[email protected]</a>_pr[JJ];inc(IJ1);inc(II);
     with wArKus_bm_is[JJ] do begin NRow:=1;NTab:=II_Tabl+7; Itm1:=II; StrN:=2250;mEd:=true;NPos:=3;Lev:=1;end;P1;ArP1[IJ1]:<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="c0fd80b781b28bb5b3">[email protected]</a>_bm_is[JJ];inc(IJ1);inc(II);
     with wArKus_ob_is[JJ] do begin NRow:=1;NTab:=II_Tabl+7; Itm1:=II; StrN:=2251;mEd:=true;NPos:=3;Lev:=1;end;P1;ArP1[IJ1]:<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="4a770a3d0b38013f39">[email protected]</a>_ob_is[JJ];inc(IJ1);inc(II);
     with wArKus_mpr_is[JJ] do begin NRow:=1;NTab:=II_Tabl+7; Itm1:=II; StrN:=2252;mEd:=true;NPos:=3;Lev:=1;end;P1;ArP1[IJ1]:<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="261b665167546d5355">[email protected]</a>_mpr_is[JJ];inc(IJ1);inc(II);
 //    with wArKus_msl_is[JJ] do begin NRow:=1;NTab:=II_Tabl+7; Itm1:=II; StrN:=2253;mEd:=true;NPos:=3;Lev:=1;end;P1;ArP1[IJ1]:<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="0439447345764f7177">[email protected]</a>_msl_is[JJ];inc(IJ1);inc(II);
     with wArTypIsol[JJ] do begin NRow:=1;NTab:=II_Tabl+6; Itm6:=II;NTypChs1:=2;StrN:=2254;mEd:=true;Lev:=1;end;P6;ArP6[IJ6]:<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="231e63546251775a536a504c4f">[email protected]</a>[JJ];inc(IJ6);inc(II);

     with wArEndIsol_bot[JJ] do begin NRow:=1;NTab:=II_Tabl+6; Itm3:=II; StrN:=2258;mEd:=true;NPos:=1;Lev:=1;end;P3;ArP3[IJ3]:<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="f9c4b98eb88bbc979db08a9695">[email protected]</a>_bot[JJ];inc(IJ3);inc(II);
     with wArEndIsol_top[JJ] do begin NRow:=1;NTab:=II_Tabl+6; Itm3:=II; StrN:=2259;mEd:=true;NPos:=1;Lev:=1;end;P3;ArP3[IJ3]:<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="655825122417200b012c160a09">[email protected]</a>_top[JJ];inc(IJ3);inc(II);
     with wArTypMat_end_top_w[JJ] do begin NRow:=1;NTab:=II_Tabl+6; Itm6:=II;NTypChs1:=3;StrN:=2326;mEd:=true;Lev:=1;end;P6;ArP6[IJ6]:<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="053845724477517c75486471">[email protected]</a>_end_top_w[JJ];inc(IJ6);inc(II);
     with wArTypMat_end_bot_w[JJ] do begin NRow:=1;NTab:=II_Tabl+6; Itm6:=II;NTypChs1:=3;StrN:=2327;mEd:=true;Lev:=1;end;P6;ArP6[IJ6]:<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="5964192e182b0d202914382d">[email protected]</a>_end_bot_w[JJ];inc(IJ6);inc(II);
     with wArNst_top_isol[JJ] do begin NRow:=1;NTab:=II_Tabl+6; Itm3:=II; StrN:=2332;mEd:=true;NPos:=0;Lev:=1;end;P3;ArP3[IJ3]:<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="f3ceb384b281bd8087">[email protected]</a>_top_isol[JJ];inc(IJ3);inc(II);
     with wArNst_bot_isol[JJ] do begin NRow:=1;NTab:=II_Tabl+6; Itm3:=II; StrN:=2333;mEd:=true;NPos:=0;Lev:=1;end;P3;ArP3[IJ3]:<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="8cb1ccfbcdfec2fff8">[email protected]</a>_bot_isol[JJ];inc(IJ3);inc(II);
     with wArSh_top_isol[JJ] do begin NRow:=1;NTab:=II_Tabl+6; Itm3:=II; StrN:=2334;mEd:=true;NPos:=2;Lev:=1;end;P3;ArP3[IJ3]:<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="546914231526073c">[email protected]</a>_top_isol[JJ];inc(IJ3);inc(II);
     with wArSh_bot_isol[JJ] do begin NRow:=1;NTab:=II_Tabl+6; Itm3:=II; StrN:=2335;mEd:=true;NPos:=2;Lev:=1;end;P3;ArP3[IJ3]:<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="c8f588bf89ba9ba0">[email protected]</a>_bot_isol[JJ];inc(IJ3);inc(II);
     with wArRad_top_isol[JJ] do begin NRow:=1;NTab:=II_Tabl+6; Itm3:=II; StrN:=2336;mEd:=true;NPos:=2;Lev:=1;end;P3;ArP3[IJ3]:<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="a499e4d3e5d6f6c5c0">[email protected]</a>_top_isol[JJ];inc(IJ3);inc(II);
     with wArRad_bot_isol[JJ] do begin NRow:=1;NTab:=II_Tabl+6; Itm3:=II; StrN:=2337;mEd:=true;NPos:=2;Lev:=1;end;P3;ArP3[IJ3]:<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="4b760b3c0a39192a2f">[email protected]</a>_bot_isol[JJ];inc(IJ3);inc(II);

 //    with wArPriznZakr[JJ] do begin NRow:=1;NTab:=II_Tabl+6; Itm3:=II; StrN:=2338;mEd:=true;NPos:=0;Lev:=1;end;P3;ArP3[IJ3]:<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="102d506751624062796a7e4a717b62">[email protected]</a>[JJ];inc(IJ3);inc(II);
     //....
    end;

Просто говно. Кусок одного из вложенных циклов

guest guest, (Updated )

Комментарии (33, +33)

Школоло / Говнокод #203 Ссылка на оригинал

0

  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6
  7. 7
  8. 8
  9. 9
Function nSetColorPair(att : integer) : integer;
var
   i : integer;
Begin
   bg := att div 16;
   fg := att - (bg * 16);
   While bg > 7 Do dec(bg,8);
   While fg > 7 Do dec(fg,8);
// . . .

Кусок модуля nCRT для FreePascal 2.2. У нормальных людей att - это байт. И вообще... Говно код!

guest guest, (Updated )

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

Школоло / Говнокод #147 Ссылка на оригинал

0

  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6
  7. 7
  8. 8
  9. 9
  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
procedure date_mask(date_edit:TEdit);
var s:string;
    i:integer;
begin
  case length(date_edit.Text) of
  2:begin
      date_edit.Text:=date_edit.Text+'.';
      date_edit.SelStart:=3;
    end;
  5:begin
      date_edit.Text:=date_edit.Text+'.';
      date_edit.SelStart:=6;
    end;
  end;

  if length(date_edit.Text)=10 then
  begin
    for i:=1 to 9 do
    begin
      s:=s+date_edit.Text[i];
    end;
    date_edit.Text:=s;
    date_edit.SelStart:=9;
  end;
end;

чтобы в компонент edit вводить дату)

guest guest, (Updated )

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

Школоло / Говнокод #131 Ссылка на оригинал

0

  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6
  7. 7
  8. 8
  9. 9
  10. 10
  11. 11
  12. 12
  13. 13
  14. 14
if not MultiThread then
  begin
    GetName(@rec);
    result:=rec.fname;
  end
  else
  begin
    hThread:=CreateThread(0,0,@GetName,@rec,0,tmp);
    if WaitForSingleObject(hThread,100)=WAIT_TIMEOUT then
      TerminateThread(hThread,0)
    else
      result:=rec.fname;
    CloseHandle(hThread);
  end;

Дельфисты - ущербные люди......

guest guest, (Updated )

Комментарии (12, +12)

Школоло / Говнокод #113 Ссылка на оригинал

0

  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6
  7. 7
  8. 8
  9. 9
  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
if (TableData = 1) or ((TableData = 2) and
    (Pos(FieldDelim + 'Т_НАЦ' + FieldDelim, OpArtFields) > 0)) then
    sSelect := sSelect + ', ' + LMax + 'AR.Percent' + R + ' AR_Percent';
  if (TableData = 1) or ((TableData = 2) and
    (Pos(FieldDelim + 'Т_КАТ' + FieldDelim, OpArtFields) > 0)) then
    sSelect := sSelect + ', ' + LMax + 'AR.ID_ArtCat' + R + ' AR_ID_ArtCat';
  if (TableData = 1) or ((TableData = 2) and
    (Pos(FieldDelim + 'Т_ВЕС' + FieldDelim, OpArtFields) > 0)) then
    sSelect := sSelect + ', ' + LMax + 'AR.Weight' + R + ' AR_Weight';
  if (TableData = 1) or ((TableData = 2) and
    (Pos(FieldDelim + 'Т_ОБЪЕМ' + FieldDelim, OpArtFields) > 0)) then
    sSelect := sSelect + ', ' + LMax + 'AR.Capacity' + R + ' AR_Capacity';
  if (TableData = 1) or ((TableData = 2) and
    (Pos(FieldDelim + 'МИННАЦ' + FieldDelim, OpArtFields) > 0)) then
    sSelect := sSelect + ', ' + LMax + 'AR.MinDiscount' + R + ' AR_MinDiscount';
  if (TableData = 1) or ((TableData = 2) and
    (Pos(FieldDelim + 'Т_МИНКОЛ' + FieldDelim, OpArtFields) > 0)) then
    sSelect := sSelect + ', ' + LMax + 'AR.MinQuantity' + R + ' AR_MinQuantity';
  if (TableData = 1) or ((TableData = 2) and
    (Pos(FieldDelim + 'Т_СТАТУС' + FieldDelim, OpArtFields) > 0)) then
    sSelect := sSelect + ', ' + LMax + 'AR.Status' + R + ' AR_Status';
  if (TableData = 1) or ((TableData = 2) and
    (Pos(FieldDelim + 'Т_ГТД' + FieldDelim, OpArtFields) > 0)) then
    sSelect := sSelect + ', ' + LMax + 'AR.GTD' + R + ' AR_GTD';
  if (TableData = 1) or ((TableData = 2) and
    (Pos(FieldDelim + 'Т_СТРАНА' + FieldDelim, OpArtFields) > 0)) then 
    sSelect := sSelect + ', ' + LMax + 'CO.Name' + R + ' AR_Country';

Собирание SQL - запроса для выборки полей. И это маленький кусочек :)
Серьёзная контора с миллиардными оборотами!

guest guest, (Updated )

Комментарии (4, +4)

Школоло / Говнокод #88 Ссылка на оригинал

0

  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6
  7. 7
  8. 8
  9. 9
  10. 10
  11. 11
  12. 12
  13. 13
  14. 14
  15. 15
  16. 16
  17. 17
  18. 18
  19. 19
  20. 20
procedure TForm1.fritb(ie:longint;var fr0:extended);
 begin
v1:=0;
 for nsf:=1 to 5 do
  begin
   kl11:=0;kl12:=0;kl22:=0;
  for k:=1 to km[nsf] do
    begin
    if (cm^[ie]=cm^[nm^[(ie-1)*kms[ksf+1]+kms[nsf]+k]])and (cm^[ie]=1)
    then      kl11:=kl11+1;
    if (cm^[ie]=cm^[nm^[(ie-1)*kms[ksf+1]+kms[nsf]+k]])and (cm^[ie]=2)
    then      kl22:=kl22+1;
if (cm^[ie]<>cm^[nm^[(ie-1)*kms[ksf+1]+kms[nsf]+k]])and(cm^[nm^[(ie-1)*kms[ksf+1]+kms[nsf]+k]]<>0)and (cm^[ie]<>0)
    then      kl12:=kl12+1;
     end;
  fr0:=fr0+kl11*(p11[1,nsf])+kl22*p11[2,nsf]+kl12*p11[3,nsf];
  v1:=v1+kl11*(f11[1,nsf])+kl22*f11[2,nsf]+kl12*f11[3,nsf];
   end;
  fr0:=fr0-sqrt(abs(v1));
 end;

процеДуро

guest guest, (Updated )

Комментарии (2, +2)

Школоло / Говнокод #87 Ссылка на оригинал

0

  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6
  7. 7
  8. 8
  9. 9
  10. 10
for i:=sk[(npl-1)*5+1] to sk[(npl-1)*5+2]-1 do
   begin
   l1:=0;l2:=0;l3:=0;l4:=0;l5:=0;l6:=0;l7:=0;l8:=0;l9:=0;l10:=0;
  for j:=1 to 100 do g1[j]:=0;
   for k:=sk[(npl-1)*5+1] to sk[(npl-1)*5+2] do
     if (k<>i )and
   (((abs(xyz^[pxyz^[i]].x-xyz^[pxyz^[k]].x)< dd) or  ((lx-abs(xyz^[pxyz^[i]].x-xyz^[pxyz^[k]].x))<dd))
   and ((abs(xyz^[pxyz^[i]].y-xyz^[pxyz^[k]].y)<dd) or  ((ly-abs(xyz^[pxyz^[i]].y-xyz^[pxyz^[k]].y))<dd))
   and ((abs(xyz^[pxyz^[i]].z-xyz^[pxyz^[k]].z)<dd) or  ((lz-abs(xyz^[pxyz^[i]].z-xyz^[pxyz^[k]].z))<dd)))
   then

это только заголовок цикла ..

guest guest, (Updated )

Комментарии (4, +4)

Школоло / Говнокод #54 Ссылка на оригинал

0

  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6
  7. 7
  8. 8
  9. 9
  10. 10
  11. 11
  12. 12
  13. 13
  14. 14
  15. 15
  16. 16
  17. 17
  18. 18
  19. 19
function IntToMonth(NumberMonth: Integer): string;
begin
  сase NumberMonth of
    1: Result := 'Январь';
    2: Result := 'Февраль';
    3: Result := 'Март';
    4: Result := 'Апрель';
    5: Result := 'Май';
    6: Result := 'Июнь';
    7: Result := 'Июль';
    8: Result := 'Август';
    9: Result := 'Сентябрь';
    10: Result := 'Октябрь';
    11: Result := 'Ноябрь';
    12: Result := 'Декабрь';
  else
    Result := 'Август';
  end;
end;

Думаю, по названию функции все понятно :)

guest guest, (Updated )

Комментарии (32, +32)

Школоло / Говнокод #27 Ссылка на оригинал

0

  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6
  7. 7
  8. 8
  9. 9
  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
  47. 47
  48. 48
  49. 49
  50. 50
  51. 51
  52. 52
  53. 53
  54. 54
  55. 55
program Project1;

{$APPTYPE CONSOLE}

uses
  SysUtils;
type
  Деньга = record
    Достоинство:integer;
    Количество:integer;
  end;

var
  Лопатник: array of Деньга;

procedure ПоложитьНаЛопату(Купюра:Integer);
var
  I: Integer;
  УжеПоложили:Boolean;
begin
  if Купюра=0 then
    Exit;
  УжеПоложили:=False;
  for I := low(Лопатник) to High(Лопатник) do
    if Лопатник[i].Достоинство=Купюра then
      begin
        inc(Лопатник[i].Количество);
        УжеПоложили:=True;
      end;
  if not(УжеПоложили) then
    begin
      SetLength(Лопатник,Length(Лопатник)+1);
      Лопатник[High(Лопатник)].Достоинство:=Купюра;
      Лопатник[High(Лопатник)].Количество:=1;
    end;
end;

var
  Купюра:integer;
  i:integer;
  ВсегоНаЛопате:integer;
begin
  repeat
    Readln(Купюра);
    ПоложитьНаЛопату(Купюра);
  until Купюра=0;
  ВсегоНаЛопате:=0;
  for I := low(Лопатник) to High(Лопатник) do
    begin
      WriteLn(Format('Cost = %d Count - %d',[Лопатник[i].Достоинство,Лопатник[i].Количество]));
      inc(ВсегоНаЛопате,Лопатник[i].Достоинство*Лопатник[i].Количество);
    end;
  WriteLn(Format('All money - %d',[ВсегоНаЛопате]));
  ReadLn;
end.

Вообще-то это Delphi, но его в списке не было ;)
Задача была такая:
пользователь вводит достоинства купюры в произвольном порядке, ввод прекращ

guest guest, (Updated )

Комментарии (30, +30)