Good luck then Posted: Wed Oct 19, am. He must have left a go to in the wrong place! Procedure division perform post-message perform wait-for-answers Go to end-interaction perform make-code-changes until changes-are-done perform test-changes until changes-are-correct perform post-follow-up goback.
Posted: Wed Oct 19, pm. Maybe he's performing everything now and keeps returning to the same place. Reminds me of that great Star Trek time-loop episode with the poker game. Or was it a Frisbee? Deja vu kept getting stronger, and they eventually found a way to transmit a bit of info via lt. Data's circuitry into the next cycle that Capt. Riker's suggestion to avoid the collision was the right one. I was in my own time warp trying to recall Capt. Kirk playing poker with Mr. I suspect that Mr Spock was a bit of a wizz at "Enterprise Cobol".
Capt Kirk, as piece of wood flies off into the distance and stays away this time, "I did it! Mr Spock, raising one eyebrow, "According to my Tri-corder, sir, that was a stick". Posted: Thu Oct 20, am. Bill Woodger wrote:. There were alternate opinions of how to move the ship out of the way.
Enterprise was without warp drive or impulse drive. A couple simple changes fix this problem. If we execute this program, we will see:. The execution flow of this program goes like this: 1. While I may enjoy eating a meal in this order, these are not the results we had expected. This program, my friends, shows how genuine spaghetti code is born. When the data item referenced by one identifier is varied, the content of the data item referenced by identifier-2 is set to literal-1 or the current value of the data item referenced by identifier-3 at the point of execution of the PERFORM statement; then the specified set of statements is executed once and condition-1 of the UNTIL phrase is tested.
If the condition is false, the value of the data item referenced by identifier-2 is augmented by the specified increment or decrement value literal-2 or the value of the data item referenced by identifier-4 and the specified set of statements is executed again. The cycle continues until condition-1 is tested and found to be true, at which point control is transferred to the end of the PERFORM statement. When the data items referenced by two identifiers are varied, the content of the data item referenced by identifier-2 is set to literal-1 or the current value of the data item referenced by identifier-3; then the current value of the data item referenced by identifier-5 is set to literal-3 or the current value of the data item referenced by identifier-6; and the specified set of statements is then executed.
Condition-2 is then evaluated; if false, the content of the data item referenced by identifier-5 is augmented by literal-4 or the content of the data item referenced by identifier-7 and the specified set of statements is again executed.
The cycle continues until condition-2 is again evaluated and found to be true, at which time condition-1 is evaluated. If false, the content of the data item referenced by identifier-2 is augmented by literal-2 or the content of data item referenced by identifier-4, the content of the data item referenced by identifier-5 is set to literal-3 or the current value of the data item referenced by identifier-6 and the specified set of statements is again executed.
This cycle continues until condition-1 is again evaluated and found to be true, at which time control is transferred to the end of the PERFORM statement.
When the data items referenced by two identifiers are varied, the data item referenced by identifier-5 goes through a complete cycle FROM, BY, UNTIL each time the content of the data item referenced by identifier-2 is varied. When the contents of three or more data items referenced by identifiers are varied, the mechanism is the same as for two identifiers except that the data item being varied by each AFTER phrase goes through a complete cycle each time the data item being varied by the preceding AFTER phrase is augmented.
General Formats for Format 3. Directives In addition to Compiler directives which provide flagging and modify the reserved word list, the following directive may impact either the syntax or the semantics described in this section. Floating-point data items and literals can be used anywhere a numeric data item or literal can be specified.
They cannot be used where an integer is required. See the section Conditional Expressions in the chapter Procedure Division Each literal represents a numeric literal. The literal in the associated FROM phrase must be a positive integer.
The literal in the associated BY phrase must be a nonzero integer. The identifier in the associated BY phrase must reference an integer data item. The literal in the associated BY phrase must be an integer. The literal in the BY phrase must not be zero. Where procedure-name-1 and procedure-name-2 are both specified and either is the name of a procedure in the declaratives portion of the Procedure Division, both must be procedure-names in the same declarative section.
0コメント