Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Midelne
Jun 19, 2002

I shouldn't trust the phones. They're full of gas.

nebby posted:

His input variable is named "str" and his aggregating one is named "newstring", if I try to put myself in his position, he probably said to himself, "ok, I'll name the input variable string and the output variable newstring. That makes sense. Oh, god drat it, I can't name a variable string because its one of those special colored in words. I guess I'll just call it str." Surely he did this after having the same mental exercise happen that resulted in Uppercase -> Upercase.

function Upercase(streng : string) : string;

This notation would've been far more consistent.

Adbot
ADBOT LOVES YOU

Midelne
Jun 19, 2002

I shouldn't trust the phones. They're full of gas.

Sivart13 posted:

I get the feeling even posting the best-written COBOL you could find would still be valid for this thread.

I only work with three COBOL applications, but they're made by different companies and all of them have between sixty and two hundred uncommented batch files that are absolutely necessary for regular operation that are labeled between 1.bat and 200.bat.

Midelne
Jun 19, 2002

I shouldn't trust the phones. They're full of gas.
This may be a little simple for CoC, but my boss set this as a startup script under the default domain policy yesterday. systems.txt is a text file that contains the names of the computers in our domain.

code:
pushd %~0\..
for /f %%i in (systems.txt) do call :Check %%i
popd 
goto :eof

:check
md \\%1\c$\progra~1\mvterm
copy C:\mvbaseup\files\*.* \\%1\c$\progra~1\mvterm /Y
cacls \\%1\c$\progra~1\mvterm /T /E /C /G everyone:C
goto :eof
It's only horrible code when you consider that this was set to run on every single computer in the domain, all of which would've attempted to perform the update operation on every single computer in the domain.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply