+ Reply to Thread
Results 1 to 6 of 6

Thread: Shooting Elephants

  1. #1
    Guest.Visitor Guest

    Default Shooting Elephants

    Found on a news group: A group of programmers, each with different language skills, was given the job of writing a program to Shoot Elephants. RESULTS Pascal pgm got a compile error; #include .... elephant.h not found. "C" pgm compiled but had run time error; ARRAY pointer, out of array bounds, negative, or points to memory in another machine. After 6 months of design effort, the COBOL programmer was in the middle of a nested, IF this-is-an-elephant then IF gun-is-loaded then perform aim-gun-at-elephant thru pull-trigger else goto get-more-ammo ...... --rest of code missing; elephant charged and trampled programmer. RPG program not possible; e-l-e-p-h-a-n-t longer than six bytes. REXX version: Shoot(elephant,dead)

  2. #2
    Guest.Visitor Guest

    Default Shooting Elephants

    The RPGIII version could look like this one. Better viewed in an attached .txt file. C LOAD BULLET GUN 25 C* C *IN25 DOWEQ*OFF 25: No more bullets C* C SHOOTGUN ELEPHN 26 C *IN26 IFEQ *OFF Missed C LEAVE C ENDIF C* C LOAD BULLET GUN 25 C C ENDDO

  3. #3
    Guest.Visitor Guest

    Default Shooting Elephants

    The RPG programmer wrote the program in 1 line by defining the elephant gun as a primary file. Unfortunately, an elephant gun doesn't return EOF, so the gun is still firing. Barbara Morris

  4. #4
    Guest.Visitor Guest

    Default Shooting Elephants

    Barbara, Thanks for your input. Hey, this is an RPG Open Source code, anyone is invited to improve it You know those arguments against gun control like - "the gun does not shoot itself....." The SHOOT opcode means that someone have to pull the trigger.

  5. #5
    Guest.Visitor Guest

    Default Shooting Elephants

    It would be GUN LOAD BULLET in RPG; Remember everything is backwards; This helps improve your memory as you are writing the stuff.

  6. #6
    Guest.Visitor Guest

    Default Shooting Elephants

    Thanks for the good chuckle, you folks!

+ Reply to Thread

Similar Threads

  1. Trouble Shooting Office Vission Send Doc
    By tim.shafar@fiserv.com in forum System Administration
    Replies: 1
    Last Post: 06-01-2001, 03:29 PM
  2. White elephants
    By Guest.Visitor in forum Programming
    Replies: 3
    Last Post: 02-20-1998, 09:29 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts