Re: Goto [Was Re: Chown ???]



On 04/10/2009 11:32 AM, Dave Ihnat wrote:
The purpose of deprecating use of goto was to avoid the spaghetti code
that was so prevalent, especially in C.
spaghetti code is not limited to any language. You can write bad, unreadable code in any computer language. At the time Structured programming really targeted COBOL which was the primary business programming language.

Try the following statement in COBOL (sorry for upper case, but that was all we had):
ALTER R5RETURN to goto FOO
FOO.

:
R5RETURN.
GOTO

I had several COBOL programs that had been converted from IBM assembler to Burroughs COBOL. What the alter was was essentially an IBM assember subroutine call using the BALR (Branch and Link Register). I loved it, the old-time Burroughs programmers hated that code, but I knew IBM assembler and was not intimidated by this.

--
Jerry Feldman <gaf@xxxxxxx>
Boston Linux and Unix
PGP key id: 537C5846
PGP Key fingerprint: 3D1B 8377 A3C0 A5F2 ECBB CA3B 4607 4319 537C 5846


Attachment: signature.asc
Description: OpenPGP digital signature

--
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines

Relevant Pages

  • Re: Wang COBOL alive and well as Wang VS makes a comeback
    ... I fought to the last to keep COBOL at least peripherally in the ... will be the next language du jour... ... This contributes to the stability of programming efforts ... level of COBOL to another can be as big a deal as migrating across platforms ...
    (comp.lang.cobol)
  • Re: Hobby languages
    ... Because 100 out of 100 Java "programmers" have no idea what the ... English with someone whose native language is Swahili, ... of programming and requiring bloated resources. ... COBOL IS commonly found on the PCs of people who are interested in COBOL. ...
    (comp.lang.cobol)
  • Re: 7E7 Flight Controls Electronics
    ... was just good thing that that localization was not too easy - it would ... Please don't confuse abstraction skills of typical COBOL programmer (that ... I pointed at the current programming "biblioware" for commercial data ... > language was because I learned all the workarounds. ...
    (comp.lang.ada)
  • Re: Structured Coding
    ... more visual, some are more conceptual, some are more language oriented. ... I had major problems struggling with OO COBOL when it was first released. ... programming language ever written; light hearted, witty, amusing, ... Later I had to run some courses in Java Web programming and ...
    (comp.lang.cobol)
  • Re: OT Registry cleaners
    ... COBOL is a read only language. ... What we need is a perl to COBOL translator. ... "It is practically impossible to teach good programming to students ... the BASICs of today aren't comparable to the basics of ...
    (talk.origins)