Learn to code!!!!

Ok dude I admit you have some nice implementation when you’re handed good logic. But sometimes you just do stupid things. Like not reading the damned specifications for ifstream. I told you fifty times at least to read it before you tried to implement the thing. Did you? No. As a result? Three hours in the lab trying to hunt down where you used >> instead of get.

Not only that but you’re insistance on
while(1)
if (something or other)
break;
as the only way to do something is just wrong. For the love god you can control it in almost any other way.

Oh and finally why the hell was there a variable that just got passed around and incremented by five different functions but did nothing else? I’d like to believe that it served some purpose, past or present, but it infact seems that you just put down random shit.

Gah this rant sucks. But I’ve been in a computer lab since 4pm. The only plus side of today was the 30$ worth of good sushi acquired for free as a break. Now I comfort myself with the episode of Angel my roommate kindly taped.

Yeah. What the hell are you talking about?

Wow, I’m far enough along in my intro to programming classes that I can sort of feel your pain!

I didn’t understand a single word you said there, except for:

Angel (never seen the show)
computer (that TV thing on my desk, right?)
if
wrong

You should go into a field that is easier for the typical person to understand. . . like law.

If anyone can find a way to control the love god, please e-mail me.

Someone once told me that prayer seems to help.

Haven’t tested it yet.

Oh really.

Get used to it. It’s rare to see chunks of code that are actually impressive. An overwhelming majority of the code that sluices about on company networks out there is bloated, uncommented, illogical garbage.

Ranting about it does help a little. But listen bro, if the miscreant is still reachable, then call him out! Tell him his code is an abomination. Usually Mr Computer Learning Center is long gone by the time you have to revisit his godawful creation. Cherish this opportunity, for it too is rare.

What nefarious corporate policy has you in the lab during Angel cleaning up after him?

Recommend that he enter the Obfuscated * contest. :smiley:

i have a co-worker who does similar things. When he actually DOES something.

*Enter relevant programming language here.


//*********************************
// Fuck You Program
// By Demo
//*********************************
#include <SDMBlib>                  // for flaming
#include <iostream>                 // for cout

using namespace sdmb;

int main()
{
const bool youAreADick = true;      //are you a dick? yes.
int count = 0;                      //does absolutely nothing.

while(1)
{
if (youAreADick)                    // always true
    cout << "Fuck You" << endl;     // fuck you
else
    break;
count++;
}

return 0;
}


(defun C:STEEL ()
        (setvar "cmdecho" 0)
        (setq CLAY (getvar "clayer"))
        (command "osnap" "none" "snap" "off")
        (setvar "plinewid" 0.00)
        (initget 1 "A C W")
        (setq ANSX (getkword
                "
 
 
Angle, Channel, W-Beam 
Enter Type (A, C, W): "
                   )
        )
        (if (or (= ANSX "a") (= ANSX "A"))
                (setq ANSX (strcat "a"))
        )
        (if (or (= ANSX "c") (= ANSX "C"))
                (setq ANSX (strcat "c"))
        )
        (if (or (= ANSX "w") (= ANSX "W"))
                (setq ANSX (strcat "w"))
        )
        (cond
                ((= ANSX "a")
                        (setq
                                THK (getreal
                                "
 
 
 Enter thickess of leg: <0.25> "
                                    )
                        )
                        (if (= THK nil) (setq THK 0.25))
                        (setq
                                LEG1 (getreal
                                "n\Enter horizontal leg length: ")
                        )
                        (setq
                                LEG2 (getreal
                                "n\Enter vertical leg length: ")
                        )
                        (princ "Enter point of outside corner: ")
                        (menucmd "P0=*")
                        (setq PT2 (getpoint))
                        (setq PT1 (polar PT2 pi LEG1))
                        (setq PT3 (polar PT2 (* pi 0.5) LEG2))
                        (setq PT4 (polar PT1 (* pi 0.5) THK))
                        (setq PT5 (polar PT4 (* pi 2.0) (- LEG1 THK)))
                        (setq PT6 (polar PT3 pi THK))
                        (command "pline" PT1 PT2 PT3 "")
                        (command "pline" PT1 PT4 PT5 PT6 PT3 "")
                        (setvar "filletrad" (- THK 0.01))
                        (command "fillet" "p" "l")
                        (command "pedit" "l" "j" "w" PT1 PT3 "" "")
                )
                ((= ANSX "c")
                        (initget 1
                                "341 35 36 454 4725 567 59 682 6105 613 798 7122 7147
                                8115 8137 8187 9134 915 920 10153 1020 1025 1030
                                12207 1225 1230 15339 15400 1550"
                        )
                        (setq CHSIZE (getint
                "Enter channel designation (e.g. 341, 10153, 12207, 15339, 9134) Size: "
                                     )
                        )
                        (cond
                                ((= CHSIZE 341) (setq WEB 0.170) (setq FLG 1.410) (setq HGHT 3.0))
                                ((= CHSIZE 35) (setq WEB 0.258) (setq FLG 1.498) (setq HGHT 3.0))
                                ((= CHSIZE 36) (setq WEB 0.356) (setq FLG 1.596) (setq HGHT 3.0))
                                ((= CHSIZE 454) (setq WEB 0.184) (setq FLG 1.584) (setq HGHT 4.0))
                                ((= CHSIZE 4725) (setq WEB 0.321) (setq FLG 1.721) (setq HGHT 4.0))
                                ((= CHSIZE 567) (setq WEB 0.190) (setq FLG 1.750) (setq HGHT 5.0))
                                ((= CHSIZE 59) (setq WEB 0.325) (setq FLG 1.885) (setq HGHT 5.0))
                                ((= CHSIZE 682) (setq WEB 0.200) (setq FLG 1.920) (setq HGHT 6.0))
                                ((= CHSIZE 6105) (setq WEB 0.314) (setq FLG 2.034) (setq HGHT 6.0))
                                ((= CHSIZE 613) (setq WEB 0.437) (setq FLG 2.157) (setq HGHT 6.0))
                                ((= CHSIZE 798) (setq WEB 0.210) (setq FLG 2.090) (setq HGHT 7.0))
                                ((= CHSIZE 7122) (setq WEB 0.314) (setq FLG 2.194) (setq HGHT 7.0))
                                ((= CHSIZE 7147) (setq WEB 0.419) (setq FLG 2.299) (setq HGHT 7.0))
                                ((= CHSIZE 8115) (setq WEB 0.220) (setq FLG 2.260) (setq HGHT 8.0))
                                ((= CHSIZE 8137) (setq WEB 0.303) (setq FLG 2.343) (setq HGHT 8.0))
                                ((= CHSIZE 8187) (setq WEB 0.487) (setq FLG 2.527) (setq HGHT 8.0))
                                ((= CHSIZE 9134) (setq WEB 0.233) (setq FLG 2.433) (setq HGHT 9.00))
                                ((= CHSIZE 915) (setq WEB 0.285) (setq FLG 2.485) (setq HGHT 9.0))
                                ((= CHSIZE 920) (setq WEB 0.448) (setq FLG 2.648) (setq HGHT 9.0))
                                ((= CHSIZE 10153) (setq WEB 0.240) (setq FLG 2.600) (setq HGHT 10.0))
                                ((= CHSIZE 1020) (setq WEB 0.379) (setq FLG 2.739) (setq HGHT 10.0))
                                ((= CHSIZE 1025) (setq WEB 0.526) (setq FLG 2.886) (setq HGHT 10.0))
                                ((= CHSIZE 1030) (setq WEB 0.673) (setq FLG 3.033) (setq HGHT 10.0))
                                ((= CHSIZE 12207) (setq WEB 0.282) (setq FLG 2.942) (setq HGHT 12.0))
                                ((= CHSIZE 1225) (setq WEB 0.387) (setq FLG 3.047) (setq HGHT 12.0))
                                ((= CHSIZE 1230) (setq WEB 0.510) (setq FLG 3.170) (setq HGHT 12.0))
                                ((= CHSIZE 15339) (setq WEB 0.400) (setq FLG 3.400) (setq HGHT 15.0))
                                ((= CHSIZE 15400) (setq WEB 0.520) (setq FLG 3.520) (setq HGHT 15.0))
                                ((= CHSIZE 1550) (setq WEB 0.716) (setq FLG 3.716) (setq HGHT 15.0))
                        )
                        (princ "
 Enter point of one outside corner: ")
                        (menucmd "P0=*")
                        (setq PT2 (getpoint))
                        (setq DIST1 (/ (- FLG WEB) (cos 0.1570796)))
                        (setq PT1 (polar PT2 pi FLG))
                        (setq PT3 (polar PT2 (* pi 0.5) HGHT))
                        (setq PT4 (polar PT3 pi FLG))
                        (setq PT5 (polar PT1 (* pi 0.5) WEB))
                        (setq PT6 (polar PT5 0.1570796 DIST1))
                        (setq PT8 (polar PT4 (* pi 1.5) WEB))
                        (setq PT7 (polar PT8 6.1261057 DIST1))
                        (command "pline" PT1 PT5 PT6 PT7 PT8 PT4 "")
                        (setvar "filletrad" (- WEB 0.01))
                        (command "fillet" "p" "l")
                        (command "pline" PT1 PT2 PT3 PT4 "")
                        (command "pedit" "l" "j" "w" PT1 PT3 "" "")
                )
                ((= ANSX "w")
                        (initget 1
                                "413 516 519 69 612 615 616 620 625 810 813 815 818 821 824 828 831
                                835 840 848 858 867 1012 1015 1017 1019 1022 1026 1030 1033 1039
                                1045 1049 1054 1060 1068 1077 1088 10100 10112 1214 1216 1219 1222
                                1226 1230 1235 1240 1240 1245 1250 1253 1258 1265 1272 1279 1287 1296
                                12106 12120 12136 12152 12170 12190 12210 12230 12252 12279 12305 12336
                                1422 1426 1430 1434 1438 1443 1448 1453 1461 1468 1474 1482 1490 1499
                                14109 14120 14132 14145 14159 14176 14193 14211 14233 14257 14283
                                14311 14342 14370 14398 14426 14455 14500 14550 14605 14665 14730
                                1626 1631 1636 1640 1645 1650 1657 1667 1677 1689 16100 1835 1840 1846
                                1850 1855 1860 1865 1871 1876 1886 1897 18106 18119 2144 2150 2157
                                2162 2168 2173 2183 2193 21101 21111 21122 21132 21147 2455 2462 2468
                                2476 2484 2494 24104 24117 24131 24146 24162 2784 2794 27102 27114
                                27146 27161 27178 3099 30108 30116 30124 30132 30173 30191 30211
                                3311 3313 3314 3315 3320 3322 3324 3613 3615 3616 3617
                                3618 3619 3621 3623 3624 3626 3628 3630")
                        (setq WSIZE (getint
                "Enter W-Shape designation (e.g. 413, 69, 1049, 2455, 3630) Size: "
                                    )
                        )
                        (cond
                                ((= WSIZE 413) (setq HGHT 4.160) (setq FLG 4.060) (setq THK 0.345) (setq WEB 0.280))
                                ((= WSIZE 516) (setq HGHT 5.010) (setq FLG 5.000) (setq THK 0.360) (setq WEB 0.240))
                                ((= WSIZE 519) (setq HGHT 5.150) (setq FLG 5.030) (setq THK 0.430) (setq WEB 0.270))
                                ((= WSIZE 69) (setq HGHT 5.900) (setq FLG 3.940) (setq THK 0.215) (setq WEB 0.170))
                                ((= WSIZE 612) (setq HGHT 6.030) (setq FLG 4.000) (setq THK 0.280) (setq WEB 0.230))
                                ((= WSIZE 615) (setq HGHT 5.990) (setq FLG 5.990) (setq THK 0.260) (setq WEB 0.230))
                                ((= WSIZE 616) (setq HGHT 6.280) (setq FLG 4.030) (setq THK 0.405) (setq WEB 0.260))
                                ((= WSIZE 620) (setq HGHT 6.200) (setq FLG 6.020) (setq THK 0.365) (setq WEB 0.260))
                                ((= WSIZE 625) (setq HGHT 6.380) (setq FLG 6.080) (setq THK 0.455) (setq WEB 0.320))
                                ((= WSIZE 810) (setq HGHT 7.890) (setq FLG 3.940) (setq THK 0.205) (setq WEB 0.170))
                                ((= WSIZE 813) (setq HGHT 7.990) (setq FLG 4.000) (setq THK 0.255) (setq WEB 0.230))
                                ((= WSIZE 815) (setq HGHT 8.110) (setq FLG 4.015) (setq THK 0.315) (setq WEB 0.245))
                                ((= WSIZE 818) (setq HGHT 8.140) (setq FLG 5.250) (setq THK 0.330) (setq WEB 0.230))
                                ((= WSIZE 821) (setq HGHT 8.280) (setq FLG 5.270) (setq THK 0.400) (setq WEB 0.250))
                                ((= WSIZE 824) (setq HGHT 7.930) (setq FLG 6.495) (setq THK 0.400) (setq WEB 0.245))
                                ((= WSIZE 828) (setq HGHT 8.060) (setq FLG 6.535) (setq THK 0.465) (setq WEB 0.285))
                                ((= WSIZE 831) (setq HGHT 8.000) (setq FLG 7.995) (setq THK 0.435) (setq WEB 0.285))
                                ((= WSIZE 835) (setq HGHT 8.120) (setq FLG 8.020) (setq THK 0.495) (setq WEB 0.310))
                                ((= WSIZE 840) (setq HGHT 8.250) (setq FLG 8.070) (setq THK 0.560) (setq WEB 0.360))
                                ((= WSIZE 848) (setq HGHT 8.500) (setq FLG 8.110) (setq THK 0.685) (setq WEB 0.400))
                                ((= WSIZE 858) (setq HGHT 8.750) (setq FLG 8.220) (setq THK 0.810) (setq WEB 0.510))
                                ((= WSIZE 867) (setq HGHT 9.000) (setq FLG 8.280) (setq THK 0.935) (setq WEB 0.570))
                                ((= WSIZE 1012) (setq HGHT 9.87) (setq FLG 3.96) (setq THK 0.210) (setq WEB 0.190))
                                ((= WSIZE 1015) (setq HGHT 9.99) (setq FLG 4.00) (setq THK 0.270) (setq WEB 0.230))
                                ((= WSIZE 1017) (setq HGHT 10.11) (setq FLG 4.01) (setq THK 0.330) (setq WEB 0.240))
                                ((= WSIZE 1019) (setq HGHT 10.24) (setq FLG 4.02) (setq THK 0.395) (setq WEB 0.250))
                                ((= WSIZE 1022) (setq HGHT 10.17) (setq FLG 5.75) (setq THK 0.360) (setq WEB 0.240))
                                ((= WSIZE 1026) (setq HGHT 10.33) (setq FLG 5.77) (setq THK 0.440) (setq WEB 0.260))
                                ((= WSIZE 1030) (setq HGHT 10.47) (setq FLG 5.81) (setq THK 0.510) (setq WEB 0.300))
                                ((= WSIZE 1033) (setq HGHT 9.73) (setq FLG 7.96) (setq THK 0.435) (setq WEB 0.290))
                                ((= WSIZE 1039) (setq HGHT 9.92) (setq FLG 7.985) (setq THK 0.530) (setq WEB 0.315))
                                ((= WSIZE 1045) (setq HGHT 10.10) (setq FLG 8.02) (setq THK 0.620) (setq WEB 0.350))
                                ((= WSIZE 1049) (setq HGHT 9.98) (setq FLG 10.00) (setq THK 0.560) (setq WEB 0.340))
                                ((= WSIZE 1054) (setq HGHT 10.09) (setq FLG 10.03) (setq THK 0.615) (setq WEB 0.370))
                                ((= WSIZE 1060) (setq HGHT 10.22) (setq FLG 10.08) (setq THK 0.680) (setq WEB 0.420))
                                ((= WSIZE 1068) (setq HGHT 10.40) (setq FLG 10.13) (setq THK 0.770) (setq WEB 0.470))
                                ((= WSIZE 1077) (setq HGHT 10.60) (setq FLG 10.19) (setq THK 0.870) (setq WEB 0.530))
                                ((= WSIZE 1088) (setq HGHT 10.84) (setq FLG 10.265) (setq THK 0.990) (setq WEB 0.605))
                                ((= WSIZE 10100) (setq HGHT 11.10) (setq FLG 10.34) (setq THK 1.120) (setq WEB 0.680))
                                ((= WSIZE 10112) (setq HGHT 11.36) (setq FLG 10.415) (setq THK 1.250) (setq WEB 0.755))
                                ((= WSIZE 1214) (setq HGHT 11.91) (setq FLG 3.97) (setq THK 0.225) (setq WEB 0.200))
                                ((= WSIZE 1216) (setq HGHT 11.99) (setq FLG 3.99) (setq THK 0.265) (setq WEB 0.220))
                                ((= WSIZE 1219) (setq HGHT 12.16) (setq FLG 4.005) (setq THK 0.350) (setq WEB 0.235))
                                ((= WSIZE 1222) (setq HGHT 12.31) (setq FLG 4.03) (setq THK 0.425) (setq WEB 0.260))
                                ((= WSIZE 1226) (setq HGHT 12.22) (setq FLG 6.49) (setq THK 0.380) (setq WEB 0.230))
                                ((= WSIZE 1230) (setq HGHT 12.34) (setq FLG 6.52) (setq THK 0.440) (setq WEB 0.260))
                                ((= WSIZE 1235) (setq HGHT 12.50) (setq FLG 6.56) (setq THK 0.520) (setq WEB 0.300))
                                ((= WSIZE 1240) (setq HGHT 11.94) (setq FLG 8.005) (setq THK 0.515) (setq WEB 0.295))
                                ((= WSIZE 1245) (setq HGHT 12.06) (setq FLG 8.045) (setq THK 0.575) (setq WEB 0.335))
                                ((= WSIZE 1250) (setq HGHT 12.19) (setq FLG 8.08) (setq THK 0.640) (setq WEB 0.370))
                                ((= WSIZE 1253) (setq HGHT 12.06) (setq FLG 9.995) (setq THK 0.575) (setq WEB 0.345))
                                ((= WSIZE 1258) (setq HGHT 12.19) (setq FLG 10.10) (setq THK 0.640) (setq WEB 0.360))
                                ((= WSIZE 1265) (setq HGHT 12.12) (setq FLG 12.00) (setq THK 0.605) (setq WEB 0.390))
                                ((= WSIZE 1272) (setq HGHT 12.25) (setq FLG 12.04) (setq THK 0.670) (setq WEB 0.430))
                                ((= WSIZE 1279) (setq HGHT 12.38) (setq FLG 12.08) (setq THK 0.735) (setq WEB 0.470))
                                ((= WSIZE 1287) (setq HGHT 12.53) (setq FLG 12.125) (setq THK 0.810) (setq WEB 0.515))
                                ((= WSIZE 1296) (setq HGHT 12.71) (setq FLG 12.16) (setq THK 0.900) (setq WEB 0.550))
                                ((= WSIZE 12106) (setq HGHT 12.89) (setq FLG 12.20) (setq THK 0.990) (setq WEB 0.610))
                                ((= WSIZE 12120) (setq HGHT 13.12) (setq FLG 13.32) (setq THK 1.105) (setq WEB 0.710))
                                ((= WSIZE 12136) (setq HGHT 13.41) (setq FLG 12.40) (setq THK 1.250) (setq WEB 0.790))
                                ((= WSIZE 12152) (setq HGHT 13.71) (setq FLG 12.48) (setq THK 1.400) (setq WEB 0.870))
                                ((= WSIZE 12170) (setq HGHT 14.03) (setq FLG 12.57) (setq THK 1.560) (setq WEB 0.960))
                                ((= WSIZE 12190) (setq HGHT 14.38) (setq FLG 12.67) (setq THK 1.735) (setq WEB 1.060))
                                ((= WSIZE 12210) (setq HGHT 14.71) (setq FLG 12.79) (setq THK 1.900) (setq WEB 1.180))
                                ((= WSIZE 12230) (setq HGHT 15.05) (setq FLG 12.895) (setq THK 2.070) (setq WEB 1.285))
                                ((= WSIZE 12252) (setq HGHT 15.41) (setq FLG 13.005) (setq THK 2.250) (setq WEB 1.395))
                                ((= WSIZE 12279) (setq HGHT 15.85) (setq FLG 13.14) (setq THK 2.470) (setq WEB 1.530))
                                ((= WSIZE 12305) (setq HGHT 16.32) (setq FLG 12.235) (setq THK 2.705) (setq WEB 1.625))
                                ((= WSIZE 12336) (setq HGHT 16.82) (setq FLG 13.385) (setq THK 2.955) (setq WEB 1.775))
                                ((= WSIZE 1422) (setq HGHT 13.74) (setq FLG 5.00) (setq THK 0.335) (setq WEB 0.230))
                                ((= WSIZE 1426) (setq HGHT 13.91) (setq FLG 5.025) (setq THK 0.420) (setq WEB 0.255))
                                ((= WSIZE 1430) (setq HGHT 13.84) (setq FLG 6.73) (setq THK 0.385) (setq WEB 0.270))
                                ((= WSIZE 1434) (setq HGHT 13.98) (setq FLG 6.745) (setq THK 0.455) (setq WEB 0.285))
                                ((= WSIZE 1438) (setq HGHT 14.10) (setq FLG 6.77) (setq THK 0.515) (setq WEB 0.310))
                                ((= WSIZE 1443) (setq HGHT 13.66) (setq FLG 7.995) (setq THK 0.530) (setq WEB 0.305))
                                ((= WSIZE 1448) (setq HGHT 13.79) (setq FLG 8.03) (setq THK 0.595) (setq WEB 0.340))
                                ((= WSIZE 1453) (setq HGHT 13.92) (setq FLG 8.06) (setq THK 0.660) (setq WEB 0.370))
                                ((= WSIZE 1461) (setq HGHT 13.89) (setq FLG 9.995) (setq THK 0.645) (setq WEB 0.375))
                                ((= WSIZE 1468) (setq HGHT 14.04) (setq FLG 10.035) (setq THK 0.720) (setq WEB 0.415))
                                ((= WSIZE 1474) (setq HGHT 14.17) (setq FLG 10.07) (setq THK 0.785) (setq WEB 0.450))
                                ((= WSIZE 1482) (setq HGHT 14.31) (setq FLG 10.13) (setq THK 0.855) (setq WEB 0.510))
                                ((= WSIZE 1490) (setq HGHT 14.02) (setq FLG 14.52) (setq THK 0.710) (setq WEB 0.440))
                                ((= WSIZE 1499) (setq HGHT 14.16) (setq FLG 14.565) (setq THK 0.780) (setq WEB 0.485))
                                ((= WSIZE 14109) (setq HGHT 14.32) (setq FLG 14.605) (setq THK 0.860) (setq WEB 0.525))
                                ((= WSIZE 14120) (setq HGHT 14.48) (setq FLG 14.67) (setq THK 0.940) (setq WEB 0.590))
                                ((= WSIZE 14132) (setq HGHT 14.66) (setq FLG 14.725) (setq THK 1.030) (setq WEB 0.645))
                                ((= WSIZE 14145) (setq HGHT 14.78) (setq FLG 15.50) (setq THK 1.090) (setq WEB 0.680))
                                ((= WSIZE 14159) (setq HGHT 14.98) (setq FLG 15.565) (setq THK 1.190) (setq WEB 0.745))
                                ((= WSIZE 14176) (setq HGHT 15.22) (setq FLG 15.65) (setq THK 1.310) (setq WEB 0.830))
                                ((= WSIZE 14193) (setq HGHT 15.48) (setq FLG 15.71) (setq THK 1.440) (setq WEB 0.890))
                                ((= WSIZE 14211) (setq HGHT 15.72) (setq FLG 15.80) (setq THK 1.560) (setq WEB 0.980))
                                ((= WSIZE 14233) (setq HGHT 16.04) (setq FLG 15.89) (setq THK 1.720) (setq WEB 1.070))
                                ((= WSIZE 14257) (setq HGHT 16.38) (setq FLG 15.995) (setq THK 1.890) (setq WEB 1.175))
                                ((= WSIZE 14283) (setq HGHT 16.74) (setq FLG 16.11) (setq THK 2.070) (setq WEB 1.290))
                                ((= WSIZE 14311) (setq HGHT 17.12) (setq FLG 16.23) (setq THK 2.260) (setq WEB 1.410))
                                ((= WSIZE 14342) (setq HGHT 17.54) (setq FLG 16.36) (setq THK 2.470) (setq WEB 1.540))
                                ((= WSIZE 14370) (setq HGHT 17.92) (setq FLG 16.475) (setq THK 2.660) (setq WEB 1.655))
                                ((= WSIZE 14398) (setq HGHT 18.29) (setq FLG 16.59) (setq THK 2.845) (setq WEB 1.770))
                                ((= WSIZE 14426) (setq HGHT 18.67) (setq FLG 16.695) (setq THK 3.035) (setq WEB 1.875))
                                ((= WSIZE 14455) (setq HGHT 19.02) (setq FLG 16.835) (setq THK 3.210) (setq WEB 2.015))
                                ((= WSIZE 14500) (setq HGHT 19.60) (setq FLG 17.01) (setq THK 3.500) (setq WEB 2.190))
                                ((= WSIZE 14550) (setq HGHT 20.24) (setq FLG 3.82) (setq THK 3.820) (setq WEB 2.380))
                                ((= WSIZE 14605) (setq HGHT 20.92) (setq FLG 17.415) (setq THK 4.160) (setq WEB 2.595))
                                ((= WSIZE 14665) (setq HGHT 21.64) (setq FLG 17.65) (setq THK 4.520) (setq WEB 2.830))
                                ((= WSIZE 14730) (setq HGHT 22.42) (setq FLG 17.89) (setq THK 4.910) (setq WEB 3.070))
                                ((= WSIZE 1626) (setq HGHT 15.69) (setq FLG 5.50) (setq THK 0.345) (setq WEB 0.250))
                                ((= WSIZE 1631) (setq HGHT 15.88) (setq FLG 5.525) (setq THK 0.440) (setq WEB 0.275))
                                ((= WSIZE 1636) (setq HGHT 15.86) (setq FLG 6.985) (setq THK 0.430) (setq WEB 0.295))
                                ((= WSIZE 1640) (setq HGHT 16.01) (setq FLG 6.995) (setq THK 0.505) (setq WEB 0.305))
                                ((= WSIZE 1645) (setq HGHT 16.13) (setq FLG 7.035) (setq THK 0.565) (setq WEB 0.345))
                                ((= WSIZE 1650) (setq HGHT 16.26) (setq FLG 7.07) (setq THK 0.630) (setq WEB 0.380))
                                ((= WSIZE 1657) (setq HGHT 16.43) (setq FLG 7.12) (setq THK 0.715) (setq WEB 0.430))
                                ((= WSIZE 1667) (setq HGHT 16.33) (setq FLG 10.235) (setq THK 0.665) (setq WEB 0.395))
                                ((= WSIZE 1677) (setq HGHT 16.52) (setq FLG 10.295) (setq THK 0.760) (setq WEB 0.455))
                                ((= WSIZE 1689) (setq HGHT 16.75) (setq FLG 10.365) (setq THK 0.875) (setq WEB 0.525))
                                ((= WSIZE 16100) (setq HGHT 16.97) (setq FLG 10.125) (setq THK 0.985) (setq WEB 0.585))
                                ((= WSIZE 1835) (setq HGHT 17.70) (setq FLG 6.00) (setq THK 0.425) (setq WEB 0.300))
                                ((= WSIZE 1840) (setq HGHT 17.90) (setq FLG 6.015) (setq THK 0.525) (setq WEB 0.315))
                                ((= WSIZE 1846) (setq HGHT 18.06) (setq FLG 6.06) (setq THK 0.605) (setq WEB 0.360))
                                ((= WSIZE 1850) (setq HGHT 17.99) (setq FLG 7.495) (setq THK 0.570) (setq WEB 0.355))
                                ((= WSIZE 1855) (setq HGHT 18.11) (setq FLG 7.53) (setq THK 0.630) (setq WEB 0.390))
                                ((= WSIZE 1860) (setq HGHT 18.24) (setq FLG 7.555) (setq THK 0.695) (setq WEB 0.415))
                                ((= WSIZE 1865) (setq HGHT 18.35) (setq FLG 7.59) (setq THK 0.750) (setq WEB 0.450))
                                ((= WSIZE 1871) (setq HGHT 18.47) (setq FLG 7.635) (setq THK 0.810) (setq WEB 0.495))
                                ((= WSIZE 1876) (setq HGHT 18.21) (setq FLG 11.035) (setq THK 0.680) (setq WEB 0.425))
                                ((= WSIZE 1886) (setq HGHT 18.39) (setq FLG 11.09) (setq THK 0.770) (setq WEB 0.480))
                                ((= WSIZE 1897) (setq HGHT 18.59) (setq FLG 11.145) (setq THK 0.870) (setq WEB 0.535))
                                ((= WSIZE 18106) (setq HGHT 18.73) (setq FLG 11.20) (setq THK 0.940) (setq WEB 0.590))
                                ((= WSIZE 18119) (setq HGHT 18.97) (setq FLG 11.265) (setq THK 1.060) (setq WEB 0.655))
                                ((= WSIZE 2144) (setq HGHT 20.66) (setq FLG 6.50) (setq THK 0.450) (setq WEB 0.350))
                                ((= WSIZE 2150) (setq HGHT 20.83) (setq FLG 6.53) (setq THK 0.535) (setq WEB 0.380))
                                ((= WSIZE 2157) (setq HGHT 21.06) (setq FLG 6.555) (setq THK 0.650) (setq WEB 0.405))
                                ((= WSIZE 2162) (setq HGHT 20.99) (setq FLG 8.24) (setq THK 0.615) (setq WEB 0.400))
                                ((= WSIZE 2168) (setq HGHT 21.13) (setq FLG 8.27) (setq THK 0.685) (setq WEB 0.430))
                                ((= WSIZE 2173) (setq HGHT 21.24) (setq FLG 8.295) (setq THK 0.740) (setq WEB 0.455))
                                ((= WSIZE 2183) (setq HGHT 21.43) (setq FLG 8.355) (setq THK 0.835) (setq WEB 0.515))
                                ((= WSIZE 2193) (setq HGHT 21.62) (setq FLG 8.42) (setq THK 0.930) (setq WEB 0.580))
                                ((= WSIZE 21101) (setq HGHT 21.36) (setq FLG 12.29) (setq THK 0.800) (setq WEB 0.500))
                                ((= WSIZE 21111) (setq HGHT 21.51) (setq FLG 12.34) (setq THK 0.875) (setq WEB 0.550))
                                ((= WSIZE 21122) (setq HGHT 21.68) (setq FLG 12.39) (setq THK 0.960) (setq WEB 0.600))
                                ((= WSIZE 21132) (setq HGHT 21.83) (setq FLG 12.44) (setq THK 1.035) (setq WEB 0.650))
                                ((= WSIZE 21147) (setq HGHT 22.06) (setq FLG 12.51) (setq THK 1.150) (setq WEB 0.720))
                                ((= WSIZE 2455) (setq HGHT 23.57) (setq FLG 7.005) (setq THK 0.505) (setq WEB 0.395))
                                ((= WSIZE 2462) (setq HGHT 23.74) (setq FLG 7.04) (setq THK 0.590) (setq WEB 0.430))
                                ((= WSIZE 2468) (setq HGHT 23.73) (setq FLG 8.965) (setq THK 0.585) (setq WEB 0.415))
                                ((= WSIZE 2476) (setq HGHT 23.92) (setq FLG 8.99) (setq THK 0.680) (setq WEB 0.440))
                                ((= WSIZE 2484) (setq HGHT 24.10) (setq FLG 9.02) (setq THK 0.770) (setq WEB 0.470))
                                ((= WSIZE 2494) (setq HGHT 24.31) (setq FLG 9.065) (setq THK 0.875) (setq WEB 0.515))
                                ((= WSIZE 24104) (setq HGHT 24.06) (setq FLG 12.75) (setq THK 0.750) (setq WEB 0.500))
                                ((= WSIZE 24117) (setq HGHT 24.26) (setq FLG 12.80) (setq THK 0.850) (setq WEB 0.550))
                                ((= WSIZE 24131) (setq HGHT 24.48) (setq FLG 12.855) (setq THK 0.960) (setq WEB 0.605))
                                ((= WSIZE 24146) (setq HGHT 24.74) (setq FLG 12.90) (setq THK 1.090) (setq WEB 0.650))
                                ((= WSIZE 24162) (setq HGHT 25.00) (setq FLG 12.955) (setq THK 1.220) (setq WEB 0.750))
                                ((= WSIZE 2784) (setq HGHT 26.71) (setq FLG 9.96) (setq THK 0.640) (setq WEB 0.460))
                                ((= WSIZE 2794) (setq HGHT 26.92) (setq FLG 9.99) (setq THK 0.745) (setq WEB 0.490))
                                ((= WSIZE 27102) (setq HGHT 27.09) (setq FLG 10.015) (setq THK 0.830) (setq WEB 0.515))
                                ((= WSIZE 27114) (setq HGHT 27.29) (setq FLG 10.07) (setq THK 0.930) (setq WEB 0.570))
                                ((= WSIZE 27146) (setq HGHT 27.38) (setq FLG 13.965) (setq THK 0.975) (setq WEB 0.605))
                                ((= WSIZE 27161) (setq HGHT 27.59) (setq FLG 14.02) (setq THK 1.080) (setq WEB 0.660))
                                ((= WSIZE 27178) (setq HGHT 27.81) (setq FLG 14.085) (setq THK 1.190) (setq WEB 0.725))
                                ((= WSIZE 3099) (setq HGHT 29.65) (setq FLG 10.45) (setq THK 0.670) (setq WEB 0.520))
                                ((= WSIZE 30108) (setq HGHT 29.83) (setq FLG 10.475) (setq THK 0.760) (setq WEB 0.545))
                                ((= WSIZE 30116) (setq HGHT 30.01) (setq FLG 10.495) (setq THK 0.850) (setq WEB 0.565))
                                ((= WSIZE 30124) (setq HGHT 30.17) (setq FLG 10.515) (setq THK 0.930) (setq WEB 0.585))
                                ((= WSIZE 30132) (setq HGHT 30.31) (setq FLG 10.545) (setq THK 1.000) (setq WEB 0.615))
                                ((= WSIZE 30173) (setq HGHT 30.44) (setq FLG 14.985) (setq THK 1.065) (setq WEB 0.655))
                                ((= WSIZE 30191) (setq HGHT 30.68) (setq FLG 15.04) (setq THK 1.185) (setq WEB 0.710))
                                ((= WSIZE 30211) (setq HGHT 30.94) (setq FLG 15.105) (setq THK 1.315) (setq WEB 0.775))
                                ((= WSIZE 3311) (setq HGHT 32.86) (setq FLG 11.48) (setq THK 0.740) (setq WEB 0.550))
                                ((= WSIZE 3313) (setq HGHT 33.09) (setq FLG 11.51) (setq THK 0.855) (setq WEB 0.580))
                                ((= WSIZE 3314) (setq HGHT 33.30) (setq FLG 1.535) (setq THK 0.960) (setq WEB 0.605))
                                ((= WSIZE 3315) (setq HGHT 33.49) (setq FLG 11.565) (setq THK 1.055) (setq WEB 0.635))
                                ((= WSIZE 3320) (setq HGHT 33.68) (setq FLG 15.745) (setq THK 1.150) (setq WEB 0.715))
                                ((= WSIZE 3322) (setq HGHT 33.93) (setq FLG 15.805) (setq THK 1.275) (setq WEB 0.775))
                                ((= WSIZE 3324) (setq HGHT 34.18) (setq FLG 15.86) (setq THK 1.400) (setq WEB 0.830))
                                ((= WSIZE 3613) (setq HGHT 35.55) (setq FLG 11.95) (setq THK 0.790) (setq WEB 0.600))
                                ((= WSIZE 3615) (setq HGHT 35.85) (setq FLG 11.975) (setq THK 0.940) (setq WEB 0.625))
                                ((= WSIZE 3616) (setq HGHT 36.01) (setq FLG 12.00) (setq THK 1.020) (setq WEB 0.650))
                                ((= WSIZE 3617) (setq HGHT 36.17) (setq FLG 12.03) (setq THK 1.100) (setq WEB 0.680))
                                ((= WSIZE 3618) (setq HGHT 36.33) (setq FLG 12.075) (setq THK 1.180) (setq WEB 0.725))
                                ((= WSIZE 3619) (setq HGHT 36.49) (setq FLG 12.115) (setq THK 1.260) (setq WEB 0.765))
                                ((= WSIZE 3621) (setq HGHT 36.69) (setq FLG 12.18) (setq THK 1.36) (setq WEB 0.830))
                                ((= WSIZE 3623) (setq HGHT 35.90) (setq FLG 16.47) (setq THK 1.260) (setq WEB 0.760))
                                ((= WSIZE 3624) (setq HGHT 36.08) (setq FLG 16.51) (setq THK 1.350) (setq WEB 0.800))
                                ((= WSIZE 3626) (setq HGHT 36.26) (setq FLG 16.55) (setq THK 1.440) (setq WEB 0.840))
                                ((= WSIZE 3628) (setq HGHT 36.52) (setq FLG 16.595) (setq THK 1.570) (setq WEB 0.885))
                                ((= WSIZE 3630) (setq HGHT 36.74) (setq FLG 16.655) (setq THK 1.680) (setq WEB 0.945))

                        )
                        (princ "/nEnter lower left corner of W-Shape: ")
                        (menucmd "P0=*")
                        (setq PT2 (getpoint))
                        (setq PT1 (polar PT2 (* pi 0.5) THK))
                        (setq PT3 (polar PT2 (* pi 2.0) FLG))
                        (setq PT4 (polar PT3 (* pi 0.5) THK))
                        (setq PT6 (polar PT3 (* pi 0.5) HGHT))
                        (setq PT5 (polar PT6 (* pi 1.5) THK))
                        (setq PT7 (polar PT2 (* pi 0.5) HGHT))
                        (setq PT8 (polar PT7 (* pi 1.5) THK))
                        (setq PT9 (polar PT8 (* pi 2.0) (/ (- FLG WEB) 2.0)))
                        (setq PT10 (polar PT1 (* pi 2.0) (/ (- FLG WEB) 2.0)))
                        (setvar "filletrad" (* WEB 1.0))
                        (command "pline" PT1 PT10 PT9 PT8 "")
                        (command "fillet" "p" "l")
                        (setq MRPT1 (polar PT2 (* pi 2.0) (/ FLG 2.0)))
                        (setq MRPT2 (polar MRPT1 (* pi 0.5) HGHT))
                        (command "mirror" "l" "" MRPT1 MRPT2 "n")
                        (command "pline" PT1 PT2 PT3 PT4 "")
                        (command "pline" PT5 PT6 PT7 PT8 "")
                        (command "pedit" "l" "j" "p" "w" PT2 PT6 "" "")
                        )
                )
        (initget "Y N")
        (setq ANSX (getkword
                "
 
 
 Do you want to hatch this shape?
        
Enter (Y or N): ")
        )
        (if (or (= ANSX "y") (= ANSX "Y"))
                (setq ANSX (strcat "y")))
        (cond
                ((= ANSX "y")
                        (command "-layer" "s" "hatch" "")
                        (command "hatch" "ansi31" "" "0.0" "l" "")
                )

        )
        (if (= ANSX nil) princ)
        (command "-layer" "s" CLAY "")
        (command "orthomode" 1)
        (princ "
 
 
Enter rotation angle: ")
        (command "rotate" "l" "p" "" PT2 pause)
        (princ)
)

printf “Huh?”

I think I liked Demo’s program better. It looks like Unclebeer’s and Demo’s programs are both trying to say “Fuck you” (and really, isn’t that what most programs are trying to tell us?), but Demo’s is so much more to the point. Of course, “to the point” is probably not the intention of Unclebeer’s lovely piece of code.

Unc? Hon? My brain just exploded. I hope you’re happy.

I read it twice. This is what I got out of it:

Then Demo posted something using the “code” tags.
UncleBeer did the same thing, but took up lots of space.

Between the two of them, I now have to scroll left-right on my screen.

Oh, yeah. I thing Angel might be a TV show.

Great googly-moogly, my eyes have left the building.

I’d like to thank UB for giving me a horrible AutoCad flashback.

Actually, Unc’s code is a pretty cute AutoCAD function for drawing a cross section of structural steel members. (I just tried it.) I just might use that sometime.

Strange, as a mod UncleBeer is usually concerned about bandwidth. You should try that ribtickler over at Ars Technica. They would be LMAO, dude, and posting enhancements as follow-up. That was LISP, right? You must have saved every line of code you’ve ever written. Can I post a prime number generating algorithm now?

Oh, could you please? You know I’ve been positively dying to find one, and I’ve checked everywhere.
Whu?

Yup, LISP. That routine has a couple small flaws though. First, the cross-section when generated must appear completely in your graphics window, else the polyline won’t close itself. If the polyline cannot close, it cannot be hatched. Secondly, it assumes you have an existing layer named “hatch.” It gets kind of cranky if you chose to hatch and don’t already have the proper layer created. Thirdly, some of the shape id’s are not named according to convention. This is due to that 32767 element limit inherent in AutoCAD. You will notice this if you look carefully at the biggest W-shapes.

To the best of my current knowledge, that routine contains every existing standard structual shape.

Uncle - you are a sick, sick man

Bah! AutoCad is for sissies. Microstation is a real CAD tool.

:wink: