Code Comments
Programming Forum and web based access to our favorite programming groups."Robert Wagner" <spamblocker-robert@wagner.net> wrote in message news:niqcp0die0leftc6jc4mr2705uekke0rl9@ 4ax.com... > On Fri, 12 Nov 2004 21:50:49 -0600, Peter Lacey > <lacey@mb.sympatico.ca> wrote: > > <snip> > Perform THRU -EXIT was invented because we didn't have EXIT PARAGRAPH. > Under Micro Focus, which had EXIT PARAGRAPH for years, and all 2002 > compilers, THRU should be obsolete. Moreover, structured code has no > need for premature exits. > Micro Focus has not yet implemented the full ISO 2002 Standard. Neither has (IBM) mainframe compilers. They do not have an EXIT PARAGRAPH statement. THEREFORE, (although I don't personally use it), the Perform Para1 thru Para1-exit *style* can be quite useful if you want to provide a "escape from within thi s paragraph" structure. Furthermore, it "meets" the "single entry, single exi t" fundaamental philosophy of strucutred programm. Again, but you have another facility, what is WRONG with this (as a stylse) for those using a compiler without the EXIT PARAGRAPH syntax? P.S. If you haven't ever done it, a "premature exit" can provide signigican t run-time performance advantages - in some multi-hour batch jobs. When was t he last time you had to create or maintain such a program? If you haven't done so recently, then don't speak about what is or isn't a "good style" for such environments. -- Bill Klein wmklein <at> ix.netcom.com .
Post Follow-up to this messageIn article <bivqp09nrocm1fe258j397lt5qp6vpor55@4ax.com>, Robert Wagner <spamblocker-robert@wagner.net> wrote: [snip] >In racquetball, when my three-shots-ahead strategy goes astray, I hit >a defensive shot to throw the opponent off his stratecy. Then we're >both playing shot-by-shot. If I'm the better shot-maker, I play it >out. If he is, I accidentally hit him with ball (in match play), which >is a do-over. 'If he is (the better shot-maker), I accidentally hit him with ball'... Mr Wagner, this speaks *volumes*. DD
Post Follow-up to this messagedocdwarf@panix.com wrote: >In article <bivqp09nrocm1fe258j397lt5qp6vpor55@4ax.com>, >Robert Wagner <spamblocker-robert@wagner.net> wrote: > >[snip] > > >'If he is (the better shot-maker), I accidentally hit him with ball'... Mr >Wagner, this speaks *volumes*. Raquetball?? That's a game for little girls isn't it? A denatured version of American-style Squash, which is itself a denatured version of "proper" European / Asian Squash.. :-) -- Jeff. Ironbridge, Shrops, U.K. jjy@jakfield.xu-netx.com (remove the x..x round u-net for return address) and don't bother with ralf4, it's a spamtrap and I never go there.. :) ... "There are few hours in life more agreeable than the hour dedicated to the ceremony known as afternoon tea.." Henry James, (1843 - 1916).
Post Follow-up to this messagedocdwarf@panix.com wrote: >In article <fbsrp018t7as1jv2gu68ki959qlumhcrvg@4ax.com>, >Jeff York <ralf4@btinternet.com> wrote: > >Mr York, my ignorance of various forms of Sport is such that I cannot >answer; my response was to the tactic mentioned above which can applied to >any sort of contest with rules by which the parties involved agree to >participate. > >(Some, of course, may say that 'the only rule is that there is no rules' >but this begs the question of why Mr Wagner uses a ball to strike his >opponent instead of slipping him a shiv; if 'the only rule is 'Don't Get >Caught'' then the question becomes why not cut the brake-lines of one's >opponent's car the evening prior and win by default.) Ah Doctor.. I, as a poncy Brit, merely assumed that the tactic employed was simply the American / Vince Lombardi approach to sport - "Show me a good loser and I'll show you a loser".. And my incredulity re the sport itself and the tactics employed was... As if hearing about an aggresive game of "cats cradle".. :-) -- Jeff. Ironbridge, Shrops, U.K. jjy@jakfield.xu-netx.com (remove the x..x round u-net for return address) and don't bother with ralf4, it's a spamtrap and I never go there.. :) ... "There are few hours in life more agreeable than the hour dedicated to the ceremony known as afternoon tea.." Henry James, (1843 - 1916).
Post Follow-up to this messageIn article <bn2sp0pdtdijcak375iv0rl5b2og9hk8kd@4ax.com>, Jeff York <ralf4@btinternet.com> wrote: >docdwarf@panix.com wrote: > > >Ah Doctor.. I, as a poncy Brit, merely assumed that the tactic >employed was simply the American / Vince Lombardi approach to sport - >"Show me a good loser and I'll show you a loser".. Please, not 'Doctor', jes' ol' Doc... and many Americans, while enamored of victory - most I know of do not enter into situations with the intention of losing - have been exposed to the sentiment of '... it's how you play the game'. >And my >incredulity re the sport itself and the tactics employed was... As if >hearing about an aggresive game of "cats cradle".. :-) There are not too many objects in cat's cradle which attain the velocity mentioned by Mr Wagner, at least in the variants of which I have any knowledge. DD
Post Follow-up to this messageOn Fri, 19 Nov 2004 13:14:48 +0000, Jeff York <ralf4@btinternet.com> wrote: >docdwarf@panix.com wrote: > > >Raquetball?? That's a game for little girls isn't it? A denatured >version of American-style Squash, which is itself a denatured version >of "proper" European / Asian Squash.. :-) Squash is the sissy game. It doesn't have ceiling shots nor kill shots .. a six-inch metal plate by the floor signals foul. It expects you to play with a dead ball, a badminton racquet and nothing but passing shots. No wonder all the champions are from India and Pakistan. I hoped for better from the British.
Post Follow-up to this messageOn 19 Nov 2004 08:22:55 -0500, docdwarf@panix.com wrote: >(Some, of course, may say that 'the only rule is that there is no rules' >but this begs the question of why Mr Wagner uses a ball to strike his >opponent instead of slipping him a shiv; if 'the only rule is 'Don't Get >Caught'' then the question becomes why not cut the brake-lines of one's >opponent's car the evening prior and win by default.) The player in front is responsible for getting out of the way. If he gets hit too many times, he can be penalized for delay of game.
Post Follow-up to this messageIn article <7qnup0lqdin0d32bv6cnu9gr3c428k31br@4ax.com>, Robert Wagner <spamblocker-robert@wagner.net> wrote: >On 19 Nov 2004 08:22:55 -0500, docdwarf@panix.com wrote: > > >The player in front is responsible for getting out of the way. If he >gets hit too many times, he can be penalized for delay of game. It might seem that if the player in front is busy tending to stab wounds this penalty might be invoked, as well. DD
Post Follow-up to this messageOn 15-Nov-2004, Robert Wagner <spamblocker-robert@wagner.net> wrote: > That has been debated at great length .. not just for Cobol but other > languages as well. Many say a properly structured program has no need > for premature exits NOR for time-wasting tests in loop control. Correct. But there are occasions where minimalist maintenance favors exiti ng a paragraph rather than restructuring the existing program. The best way to exit a paragraph this way is with an EXIT PARAGRAPH command, if it is available. Alternative ways include use of switches and GO TO PARAGRAPH-EXIT. > What's wrong with it is program bloat. Practitioners PERFORM .. THRU > -EXIT on every blasted paragraph, not just the minority (if any) that > need an exit. The philosophy behind this is that we can't predict which paragraphs will eventually need maintenance requiring an early exit. By providing a standa rd, they provide the maintenance programmers with an EXIT PARAGRAPH option. That said - I dislike PERFORM THRU, and will be very glad when this argument will be easily countered (when we have EXIT PARAGRAPH available). > I've found that rewriting poorly structured programs gives an average > speed increase of 50% .. across the board, not just in isolated cases. > A small by-product of proper structuring is elimination of premature > exits and redundant exception tests. I've found that extensive changes to existing programs cost a lot here and n ow, and nobody's willing to pay for speed increases unless it is to get a progra m finished running before a deadline. > "Playing shot by shot will get you in trouble. You've got to have an > overall strategy to win." - Gary Player I'm a golfer. While we plan our shots from the green back to the tee - whe n we hit the ball into the woods, it is essential to take the shot we have right now - forgetting what went on before. The only time we should try heroics is if failure to hit this shot means losing (this occurs in match play some). In medal play, we should take the safe play not dig a deeper hole for ourselves .
Post Follow-up to this messageRobert Wagner <spamblocker-robert@wagner.net> wrote: >On 16 Nov 2004 13:51:50 -0800, riplin@Azonic.co.nz (Richard) wrote: > > >I measured it. My rewrites did more than restructure programs, they >restructured job streams as well. For example, three batch programs >that copy a file and compute something might be changed into one main >program that copies the file and three callable programs that do >computations. Three reads and three writes were replaced by one read >and one write. With all due respect, that's absolutely *nothing* to do with "programming style"... You've replaced an old or inefficient bit of system design with something more efficient and gained a performance increase in the process. You're attempting to compare apples and bulldozers. -- Jeff. Ironbridge, Shrops, U.K. jjy@jakfield.xu-netx.com (remove the x..x round u-net for return address) and don't bother with ralf4, it's a spamtrap and I never go there.. :) ... "There are few hours in life more agreeable than the hour dedicated to the ceremony known as afternoon tea.." Henry James, (1843 - 1916).
Post Follow-up to this messagePowered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.