At this stage, look at the specification again. A sailor might need to put on the pullover in the dark, quickly,
without worrying about the front or back. Therefore, the front should be the same as the back; and the two
sleeves should also be the same. This could be programmed:
do 2
CALL Knit_body_panel
end
do 2
CALL Knit_sleeve
end
CALL sew_pieces_together
In programming, the best method is to go on refining your program, working from the top, until you get
down to something that is easy to code.
Top down
is the best approach.
Reconsider the Data
When you are refining your program, your objective is to make each piece simpler. This almost certainly
means:
v
Simpler input data for each segment or routine
v
Simpler output data for each segment or routine
v
Simpler processing
v
And, therefore, simpler code.
If your pieces really are simpler, they will probably have simpler names, too. For instance:
v
Knit cuff
rather than
v
Make ribbing for cuffs and waistband.
Correcting Your Program
If you cannot understand why your program is giving wrong results, you can:
v
Modify your program so that it tells you what it is doing
v
Use some of the REXX interactive trace facilities (See “Interactive Debugging of Programs” on page
411).
You will gradually learn which of these techniques suits you better.
Modifying Your Program
You can put extra instructions into your program, such as:
...
say "Checkpoint A.
x =" x
...
say "End of first routine"
...
Tracing Your Program
Or you can use the TRACE instruction, described on page 166.
v
To find out where your program is going, use TRACE Labels. The example shows a program and the
trace it gives on the screen.
Programming Style and Techniques
Chapter 10. Programming Style and Techniques
95
Содержание SC34-5764-01
Страница 1: ...CICS Transaction Server for VSE ESA REXX Guide SC34 5764 01...
Страница 2: ......
Страница 3: ...CICS Transaction Server for VSE ESA REXX Guide SC34 5764 01...
Страница 22: ...xx CICS TS for VSE ESA REXX Guide...
Страница 23: ...Part 1 User s Guide Copyright IBM Corp 1992 2009 1...
Страница 24: ...2 CICS TS for VSE ESA REXX Guide...
Страница 40: ...18 CICS TS for VSE ESA REXX Guide...
Страница 54: ...Using Variables and Expressions 32 CICS TS for VSE ESA REXX Guide...
Страница 106: ...84 CICS TS for VSE ESA REXX Guide...
Страница 110: ...88 CICS TS for VSE ESA REXX Guide...
Страница 122: ...100 CICS TS for VSE ESA REXX Guide...
Страница 123: ...Part 2 Reference Copyright IBM Corp 1992 2009 101...
Страница 124: ...102 CICS TS for VSE ESA REXX Guide...
Страница 130: ...Introduction 108 CICS TS for VSE ESA REXX Guide...
Страница 152: ...REXX General Concepts 130 CICS TS for VSE ESA REXX Guide...
Страница 224: ...Functions 202 CICS TS for VSE ESA REXX Guide...
Страница 252: ...230 CICS TS for VSE ESA REXX Guide...
Страница 278: ...256 CICS TS for VSE ESA REXX Guide...
Страница 312: ...DB2 Interface 290 CICS TS for VSE ESA REXX Guide...
Страница 316: ...High level Client Server Support 294 CICS TS for VSE ESA REXX Guide...
Страница 340: ...318 CICS TS for VSE ESA REXX Guide...
Страница 344: ...for execs Commands 322 CICS TS for VSE ESA REXX Guide...
Страница 399: ...Part 3 Appendixes Copyright IBM Corp 1992 2009 377...
Страница 400: ...378 CICS TS for VSE ESA REXX Guide...
Страница 438: ...416 CICS TS for VSE ESA REXX Guide...
Страница 442: ...System Definition Customization Administration 420 CICS TS for VSE ESA REXX Guide...
Страница 446: ...Security 424 CICS TS for VSE ESA REXX Guide...
Страница 448: ...426 CICS TS for VSE ESA REXX Guide...
Страница 464: ...442 CICS TS for VSE ESA REXX Guide...
Страница 466: ...444 CICS TS for VSE ESA REXX Guide...
Страница 468: ...446 CICS TS for VSE ESA REXX Guide...
Страница 476: ...454 CICS TS for VSE ESA REXX Guide...
Страница 478: ...456 CICS TS for VSE ESA REXX Guide...
Страница 479: ......
Страница 480: ...SC34 5764 01...
Страница 481: ...Spine information CICS TS for VSE ESA REXX Guide...