home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1994 #1 / monster.zip / monster / PROG_BAS / PROG914.ZIP / PROGRAM.DOC < prev    next >
Text File  |  1994-01-27  |  56KB  |  1,324 lines

  1. PROGRAM.DOC                 by:  Ira F. Kavaler - March & April, 1987
  2. Version 9.14 - 1/27/94
  3.  
  4.  
  5.      The BASIC Language PROGRAM Generator.
  6.      -------------------------------------
  7.  
  8.      I love teaching technical subjects, but I'm not a teacher.  I'm an
  9. electrical engineer by trade.  While receiving my higher education I
  10. despised computers.  I was a radio man;  a "ham" (amateur radio)
  11. operator.  Based on these early tendencies my first block of technical
  12. training after high school came from RCA Institutes in New York City.
  13. At RCA I took their Advanced Technologies course (T-3) which consisted
  14. of nine terms;  the first eight were straight forward Mathematics
  15. (Calculus), English, Science (Physics), Industrial Engineering, and
  16. Electrical and Electronic Theory.  The ninth, and last, term was
  17. specialization in either Communications Technology or Computer Science.
  18. Of course, I elected communications!  I and my classmates called the
  19. computer kids, "button pushers"!
  20.  
  21.      After graduating from RCA I decided to get my EE degree, so I went
  22. to The Polytechnic Institute of Brooklyn, now masquerading as The
  23. Polytechnic University of New York.
  24.  
  25.      In 1963, while attending Poly, I happened into my public library
  26. one day and, for lack of something better to read, I checked-out a book
  27. on computer programming in machine language.  The book was in the RCA
  28. Tutor Series, which was supposed to be a self-learning text;  and it
  29. was!
  30.  
  31.      Within days I was writing machine language program for a computer
  32. I didn't even have access to.  I was converted to a "button pusher".
  33. The next semester I enrolled in computer classes; Poly had a total of
  34. two:  Computer Techniques and Mathematical Techniques;  the latter had
  35. very little to do with programming.  The language taught was Fortran
  36. IV, and I was writing programs within a day.  My professor couldn't
  37. follow the subject matter, complexity, nor logic of my programs by the
  38. second week.
  39.  
  40.      As a class project, I proved by computer simulation that broadcast
  41. color television standards set in the 1950's were wrong;  the
  42. modulation compression limits established by the broadcast industry and
  43. the FCC were incorrect.
  44.  
  45.      A second class project was a business inventory and ordering
  46. program for my family's paint business.
  47.  
  48.      By the next semester (1964) my guidance counselor realized my
  49. potential (after "being hit over the head with pleas for computer
  50. time"), so he got me a National Science Foundation grant, and
  51. sponsorship by NASA to do computer programming research.  My primary
  52. project was to develop a program to digest vacuum tube and transistor
  53. specifications and characteristic curves for the design of electronic
  54. circuits.  I was very successful, having been offered positions by many
  55. large computer companies upon graduation.
  56.  
  57.      I was given access to the newly installed IBM 7040 System, and
  58. time sharing system connected to the GE Datanet, using Darthmouth
  59. BASIC, FORTRAN and ALGOL languages.  When Poly replaced the 7040 System
  60. with a new System / 360, I wrote many of the library functions for its
  61. APL (Inversion) language.
  62.  
  63.      While still a student at Poly I started teaching computer
  64. programming classes in additional to the advanced communications
  65. technologies classes I was conducting.  I was so successful in getting
  66. other students interested in computer programming that I started
  67. teaching programming to pre-teenagers in my neighborhood.
  68.  
  69.      Upon graduation my family did not was me to move out of New York
  70. City, so I turned down a very lucrative offer by IBM and got a job with
  71. the government;  my mother wanted me to have a secure job, and she was
  72. right!
  73.  
  74.      I was always striving to discover the perfect teaching method;
  75. something I'm still trying to do.  My teaching techniques progressed to
  76. the point that I could teach a person to write a simple program within
  77. one hour using the six primitive BASIC commands:  LET, INPUT, PRINT,
  78. GOTO, IF...THEN, and END.
  79.  
  80.      When I finally got my first home computer* in 1979 (and I resisted
  81. getting one for many years) I was on my way to unlimited computer time.
  82. A couple of years later my boss arranged to get me an IBM XT system.
  83.  
  84.      (* My first machine was a Super Elf 1802 microprocessor on a
  85. single board, followed months later by a TRS-80 Model I, which I still
  86. have in perfect operating condition, amongst other early computer
  87. systems I've been collecting over the years.)
  88.  
  89.      I tough an interesting project would be to write a program that
  90. would allow non-programmers to write fully functional BASIC language
  91. programs with extremely minimal training.  To that goal I wrote the
  92. program "PROGRAM", which in 1987 was called simply "PGM".
  93.  
  94.  
  95.      Some terms I used.
  96.      ------------------
  97.  
  98.      I tried to explain each of the selections in the two menus:
  99. Instruction and Action.  At one point I was stumped!  How do I describe
  100. altering the processing path to go back to an earlier point on the
  101. program, or to jump ahead to a later point in the program?  I decided
  102. to call the point, either earlier or later, in the program a
  103. "signpost";  it identifies a referenced line number.  To identify the
  104. point you erect a signpost.
  105.  
  106.      The term I used to go to the signpost was "detour".  When writing
  107. a program you will usually decide to detour to a signpost that has not
  108. been erected yet.  That's OK, PROGRAM will ask for an inscription
  109. (label) for that signpost, and use that inscription until it determines
  110. the actual location of the signpost.  If you happen to erect the
  111. signpost first, the inscription is still used when any detours to that
  112. signpost are encountered.
  113.  
  114.  
  115.      Let's try to write a program in BASIC using PROGRAM.
  116.      ----------------------------------------------------
  117.  
  118.      One of the problem I like to teach as a programming example is the
  119. calculation of the amount of wallpaper required for a room.  Having
  120. worked in the paint industry for fifteen years while going to school, I
  121. have discovered the vast majority of people do not know how to
  122. determine how much area a single roll of wallpaper will cover.  The
  123. following program development will yield a stand alone BASIC program to
  124. solve this problem.
  125.  
  126.      First read the other documentation file supplied with this
  127. package.  It contains the problem broken down into a series of simple
  128. steps.  From these simple steps you can draw a simple flow chart that
  129. will diagram these steps.  The diagram should look similar to the
  130. following:
  131.  
  132.                               ┌─────────┐
  133. I have drawn this with        │  START  │    No command required
  134. only rectangles as            └────┬────┘
  135. limited by my word                 │
  136. processor and printer.      ┌──────┴──────┐
  137.                             │  ASK WIDTH  │    Call it W
  138.                             │   INPUT W   │
  139.                             └──────┬──────┘
  140.                                    │
  141.                             ┌──────┴───────┐
  142.                             │  ASK LENGTH  │    Call it L
  143.                             │   INPUT L    │
  144.                             └──────┬───────┘
  145.                                    │
  146.                        ┌───────────┴───────────┐
  147.                        │  CALCULATE PERIMETER  │    Call it P
  148.                        │       P=2*L+2*W       │
  149.                        └───────────┬───────────┘
  150.                                    │
  151.                             ┌──────┴───────┐
  152.                             │  ASK HEIGHT  │    Call it H
  153.                             │   INPUT H    │
  154.                             └──────┬───────┘
  155.                                    │
  156.                           ┌────────┴─────────┐
  157.                           │  CALCULATE AREA  │    Call it A
  158.                           │      A=P*H       │
  159.                           └────────┬─────────┘
  160.                                    │
  161.                          ┌─────────┴─────────┐
  162.                          │     CALCULATE     │    The gov't requires
  163.                          │  NUMBER OF ROLLS  │    30 sq.ft. of paper
  164.                          │       N=A/30      │    per single roll
  165.                          └─────────┬─────────┘    Call it N
  166.                                    │
  167.                             ┌──────┴───────┐
  168.                             │  ASK NUMBER  │
  169.                             │   OF DOORS   │    Call it ND
  170.                             │   INPUT ND   │
  171.                             └──────┬───────┘
  172.                                    │
  173.                             ┌──────┴───────┐
  174.                             │  ASK NUMBER  │
  175.                             │  OF WINDOWS  │    Call it NW
  176.                             │   INPUT NW   │
  177.                             └──────┬───────┘
  178.                                    │
  179.                         ┌──────────┴───────────┐
  180.                         │  CALCULATE OPENINGS  │    Call it OP
  181.                         │       OP=ND+NW       │
  182.                         └──────────┬───────────┘
  183.                                    │
  184.                       ┌────────────┴─────────────┐    Adjust number
  185.                       │  CALCULATE SINGLE ROLLS  │    rolls, exclude
  186.                       │        SR=N-OP/2         │    number openings
  187.                       └────────────┬─────────────┘    Call it SR
  188.                                    │
  189.                        ┌───────────┴────────────┐
  190.                        │  DISPLAY ANSWER USING  │     The two commands
  191.                        │  TWO INSTRUCTIONS TO   │     allow for more
  192.                        │   INCLUDING WORDING    │     words and place-
  193.                        │        PRINT SR        │     ment chosen
  194.                        └───────────┬────────────┘
  195.                                    │
  196.                                 ┌──┴────┐
  197.                                 │  END  │    This command is optional
  198.                                 └───────┘
  199.  
  200.  
  201.      With the flow chart in hand we can run PROGRAM and start writing
  202. the wallpaper program.  When PROGRAM starts it will display the banner
  203. screen, opening screen, and first question dealing with menu
  204. abbreviations.  Beginners should select n for no abbreviated menus;
  205. advanced users can select y for abbreviated menus.  I have had to
  206. either truncate or word wrap some lines of the program output as
  207. imported into this document:
  208.  
  209.  
  210. - - - - - = = = = =  PROGRAM output below = = = = = - - - - -
  211.  
  212. PROGRAM   by: Ira F. Kavaler,  March & April, 1987
  213.  
  214. **  **  **  **  **               **  **  **  **             ****
  215. **                **          **                **          ** **
  216. **                **          **                            **  **
  217. **                **          **                            **   **
  218. **  **  **  **  **     R  O   **        **  **  **   R  A   **    **
  219. **                            **                **          **     **
  220. **                            **                **          **
  221. **                               **  **  **  **             **       **
  222.  
  223. Do you want abbreviated menus (Y/N) ? n
  224.  
  225. = = = = = - - - - - End of this portion of output - - - - - = = = = =
  226.  
  227.  
  228.      The next item displayed will be the action menu.  Since we are
  229. starting a new program select action type 1:
  230.  
  231.  
  232. - - - - - = = = = =  PROGRAM output below = = = = = - - - - -
  233.  
  234. Select an action from this list:
  235.  
  236. 1  Start a new set of instructions (show instruction menu),
  237.    erasing the current set of instructions,
  238. 2  LOAD - retrieve a set of instructions previously saved on disk,
  239.           erasing the current set of instructions,
  240. 3  SAVE - save the current set of instructions on disk,
  241. 4  EDIT the instructions by ADDING instructions
  242.         after the last current instruction,
  243. 5  EDIT the instructions by REPLACING an instruction,
  244. 6  EDIT the instructions by DELETING an instruction,
  245. 7  EDIT the instructions by INSERTING an instruction
  246.         between two current instructions,
  247. 8  LIST - display the complete set of instructions on the screen, or
  248. 9  Terminate this program and return to a BASIC ready condition.
  249.  
  250. Select action type (1-9) ? 1
  251.  
  252. = = = = = - - - - - End of this portion of output - - - - - = = = = =
  253.  
  254.  
  255.      PROGRAM now need a name for the program to be written.  It now
  256. asks for that name.  It will use only the first eight characters.  We
  257. will enter WALLPAPR to satisfy this condition.  The actual filename
  258. will be displayed followed by the instruction menu.  Since the first
  259. instruction of our program deals with asking a question, we select
  260. instruction type 1:
  261.  
  262.  
  263. - - - - - = = = = =  PROGRAM output below = = = = = - - - - -
  264.  
  265. What is the name of this set of instructions (try to use 8 letters or
  266. less), and if you know what a file extension is, don't use it) ?
  267. wallpapr
  268. The actual filename used on this disk is:  WALLPAPR.BAS
  269.  
  270. Select a type of instruction from this list:
  271.  
  272. 1  INPUT - have the computer ask a question and await a keyboard
  273.            answer,
  274. 2  LET - have the computer evaluate an arithmetic expression,
  275.          evaluate a formula, or define the value of a constant,
  276. 3  PRINT - have the computer display a result and/or message, or
  277.            skip a line on the screen,
  278. 4  IF / THEN - have the computer make a decision based upon a
  279.                comparison,
  280. 5  (Labelled Line Number) - have the computer erect a signpost,
  281. 6  GOTO - have the computer detour to a signpost,
  282. 7  END - have the computer stop the processing of instructions,
  283. 8  LIST - display the complete list of instructions on the screen, or
  284. 9  There are no more instructions at this time; show action menu.
  285.  
  286. Select instruction type (1-9) ? 1
  287.  
  288. = = = = = - - - - - End of this portion of output - - - - - = = = = =
  289.  
  290.  
  291.      This is the INPUT command.  Two items are required for this
  292. command.  First Is the question you want your wallpaper program to
  293. display when asking the question.  The second is the name of the memory
  294. location where the answer to the question will be stored;  this is
  295. called a variable, and it is given a one or two letter label
  296. (identification or name).  You should choose a label that is associated
  297. with the answer to the question.  Since the first question deals with
  298. the width of the room, a logical choice for the label would be W for
  299. width.  Once the two piece of information are furnished PROGRAM will
  300. write that instruction.  At the start of any program I have generated
  301. four additional instructions that have no effect on the program
  302. operation;  they are lines 10 through 50.  The INPUT command just
  303. written will be line 50.  PROGRAM displays the program created thus
  304. far, with the newly generated line highlighted.  The instruction menu
  305. will again be displayed.  The second block of the flow chart deals with
  306. an INPUT command so instruction type 1 is chosen again:
  307.  
  308.  
  309. - - - - - = = = = =  PROGRAM output below = = = = = - - - - -
  310.  
  311. What question should the computer ask (or press [ENTER] for no
  312. question) ? What is the width of the room
  313. What one or two letter label should the computer use to identify the
  314. answer to the question? w
  315.  
  316. 10 REM *** START *** WALLPAPR.BAS / 01-27-1994 / 08:43:20
  317. 20 REM *** This BASIC program was generated by PROGRAM.EXE
  318. 30 REM *** A shareware program written by IRA F. KAVALER.
  319. 40 KEY OFF: CLS: REM *** Turn off F-key labels & clear screen.
  320. 50 INPUT "What is the width of the room";W
  321.  
  322. Select a type of instruction from this list:
  323.  
  324. 1  INPUT - have the computer ask a question and await a keyboard
  325.            answer,
  326. 2  LET - have the computer evaluate an arithmetic expression,
  327.          evaluate a formula, or define the value of a constant,
  328. 3  PRINT - have the computer display a result and/or message, or
  329.            skip a line on the screen,
  330. 4  IF / THEN - have the computer make a decision based upon a
  331.                comparison,
  332. 5  (Labelled Line Number) - have the computer erect a signpost,
  333. 6  GOTO - have the computer detour to a signpost,
  334. 7  END - have the computer stop the processing of instructions,
  335. 8  LIST - display the complete list of instructions on the screen, or
  336. 9  There are no more instructions at this time; show action menu.
  337.  
  338. Select instruction type (1-9) ? 1
  339.  
  340. = = = = = - - - - - End of this portion of output - - - - - = = = = =
  341.  
  342.  
  343.      Proceed to supply the required information for the length of the
  344. room, logically choosing L for length.  The third flow chart block
  345. involves calculating the perimeter of the room from its length and
  346. width.  Instruction type 2 does this task and writes the LET command.
  347. The LET command has three purposes: 1.  it allows one variable label to
  348. be set equal to another variable label, 2.  it allows one variable
  349. label to be set to a constant (number, value), or 3. it allows a
  350. variable label to be set equal to a formula or arithmetic expression.
  351. This latter case is the one needed; that is, P=2*l+2*W
  352.  
  353.      Again two pieces of information are required for the LET command,
  354. the variable label to be calculated or set and the variable label
  355. holding the value, the constant, or (as is the case) the formula.  Note
  356. that you do not enter the entire formula, just the two parts.  PROGRAM
  357. will assembly the command in the proper order, write the instruction,
  358. list the program thus far, and redisplay the instruction menu:
  359.  
  360.  
  361. - - - - - = = = = =  PROGRAM output below = = = = = - - - - -
  362.  
  363. What question should the computer ask (or press [ENTER] for no
  364. question) ? What is the length of the room
  365. What one or two letter label should the computer use to identify the
  366. answer to the question? l
  367.  
  368. 10 REM *** START *** WALLPAPR.BAS / 01-27-1994 / 08:43:20
  369. 20 REM *** This BASIC program was generated by PROGRAM.EXE
  370. 30 REM *** A shareware program written by IRA F. KAVALER.
  371. 40 KEY OFF: CLS: REM *** Turn off F-key labels & clear screen.
  372. 50 INPUT "What is the width of the room";W
  373. 60 INPUT "What is the length of the room";L
  374.  
  375. Select a type of instruction from this list:
  376.  
  377. 1  INPUT - have the computer ask a question and await a keyboard
  378.            answer,
  379. 2  LET - have the computer evaluate an arithmetic expression,
  380.          evaluate a formula, or define the value of a constant,
  381. 3  PRINT - have the computer display a result and/or message, or
  382.            skip a line on the screen,
  383. 4  IF / THEN - have the computer make a decision based upon a
  384.                comparison,
  385. 5  (Labelled Line Number) - have the computer erect a signpost,
  386. 6  GOTO - have the computer detour to a signpost,
  387. 7  END - have the computer stop the processing of instructions,
  388. 8  LIST - display the complete list of instructions on the screen, or
  389. 9  There are no more instructions at this time; show action menu.
  390.  
  391. Select instruction type (1-9) ? 2
  392. What one or two letter label should the computer use to identify the
  393. result of the formula? p
  394. Using one or two letter labels already established, what is the
  395. formula, arithmetic expression, or constant? 2*l+2*w
  396.  
  397. 10 REM *** START *** WALLPAPR.BAS / 01-27-1994 / 08:43:20
  398. 20 REM *** This BASIC program was generated by PROGRAM.EXE
  399. 30 REM *** A shareware program written by IRA F. KAVALER.
  400. 40 KEY OFF: CLS: REM *** Turn off F-key labels & clear screen.
  401. 50 INPUT "What is the width of the room";W
  402. 60 INPUT "What is the length of the room";L
  403. 70 LET P=2*L+2*W
  404.  
  405. Select a type of instruction from this list:
  406.  
  407. 1  INPUT - have the computer ask a question and await a keyboard
  408.            answer,
  409. 2  LET - have the computer evaluate an arithmetic expression,
  410.          evaluate a formula, or define the value of a constant,
  411. 3  PRINT - have the computer display a result and/or message, or
  412.            skip a line on the screen,
  413. 4  IF / THEN - have the computer make a decision based upon a
  414.                comparison,
  415. 5  (Labelled Line Number) - have the computer erect a signpost,
  416. 6  GOTO - have the computer detour to a signpost,
  417. 7  END - have the computer stop the processing of instructions,
  418. 8  LIST - display the complete list of instructions on the screen, or
  419. 9  There are no more instructions at this time; show action menu.
  420.  
  421. Select instruction type (1-9) ? 1
  422.  
  423. = = = = = - - - - - End of this portion of output - - - - - = = = = =
  424.  
  425.  
  426.      Now it's time to ask for the ceiling height and then calculate the
  427. wall area.  These two steps require an INPUT command followed by a LET
  428. command.  The formula for the wall area is A=P*H
  429.  
  430.  
  431. - - - - - = = = = =  PROGRAM output below = = = = = - - - - -
  432.  
  433. What question should the computer ask (or press [ENTER] for no
  434. question) ? What is the ceiling height
  435. What one or two letter label should the computer use to identify the
  436. answer to the question? h
  437.  
  438. 10 REM *** START *** WALLPAPR.BAS / 01-27-1994 / 08:43:20
  439. 20 REM *** This BASIC program was generated by PROGRAM.EXE
  440. 30 REM *** A shareware program written by IRA F. KAVALER.
  441. 40 KEY OFF: CLS: REM *** Turn off F-key labels & clear screen.
  442. 50 INPUT "What is the width of the room";W
  443. 60 INPUT "What is the length of the room";L
  444. 70 LET P=2*L+2*W
  445. 80 INPUT "What is the ceiling height";H
  446.  
  447. Select a type of instruction from this list:
  448.  
  449. 1  INPUT - have the computer ask a question and await a keyboard
  450.            answer,
  451. 2  LET - have the computer evaluate an arithmetic expression,
  452.          evaluate a formula, or define the value of a constant,
  453. 3  PRINT - have the computer display a result and/or message, or
  454.            skip a line on the screen,
  455. 4  IF / THEN - have the computer make a decision based upon a
  456.                comparison,
  457. 5  (Labelled Line Number) - have the computer erect a signpost,
  458. 6  GOTO - have the computer detour to a signpost,
  459. 7  END - have the computer stop the processing of instructions,
  460. 8  LIST - display the complete list of instructions on the screen, or
  461. 9  There are no more instructions at this time; show action menu.
  462.  
  463. Select instruction type (1-9) ? 2
  464. What one or two letter label should the computer use to identify the
  465. result of the formula? a
  466. Using one or two letter labels already established, what is the
  467. formula, arithmetic expression, or constant? p*h
  468.  
  469. 10 REM *** START *** WALLPAPR.BAS / 01-27-1994 / 08:43:20
  470. 20 REM *** This BASIC program was generated by PROGRAM.EXE
  471. 30 REM *** A shareware program written by IRA F. KAVALER.
  472. 40 KEY OFF: CLS: REM *** Turn off F-key labels & clear screen.
  473. 50 INPUT "What is the width of the room";W
  474. 60 INPUT "What is the length of the room";L
  475. 70 LET P=2*L+2*W
  476. 80 INPUT "What is the ceiling height";H
  477. 90 LET A=P*H
  478.  
  479. Select a type of instruction from this list:
  480.  
  481. 1  INPUT - have the computer ask a question and await a keyboard
  482.            answer,
  483. 2  LET - have the computer evaluate an arithmetic expression,
  484.          evaluate a formula, or define the value of a constant,
  485. 3  PRINT - have the computer display a result and/or message, or
  486.            skip a line on the screen,
  487. 4  IF / THEN - have the computer make a decision based upon a
  488.                comparison,
  489. 5  (Labelled Line Number) - have the computer erect a signpost,
  490. 6  GOTO - have the computer detour to a signpost,
  491. 7  END - have the computer stop the processing of instructions,
  492. 8  LIST - display the complete list of instructions on the screen, or
  493. 9  There are no more instructions at this time; show action menu.
  494.  
  495. Select instruction type (1-9) ? 2
  496.  
  497. = = = = = - - - - - End of this portion of output - - - - - = = = = =
  498.  
  499.  
  500.      The heart of the solution to this program is the fact that the
  501. government regulates the amount of wallpaper in a single roll to 30
  502. square feet.  The LET command to hold this arithmetic expression is now
  503. generated in another LET command:
  504.  
  505.  
  506. - - - - - = = = = =  PROGRAM output below = = = = = - - - - -
  507.  
  508. What one or two letter label should the computer use to identify the
  509. result of the formula? n
  510. Using one or two letter labels already established, what is the
  511. formula, arithmetic expression, or constant? a/30
  512.  
  513. 10 REM *** START *** WALLPAPR.BAS / 01-27-1994 / 08:43:20
  514. 20 REM *** This BASIC program was generated by PROGRAM.EXE
  515. 30 REM *** A shareware program written by IRA F. KAVALER.
  516. 40 KEY OFF: CLS: REM *** Turn off F-key labels & clear screen.
  517. 50 INPUT "What is the width of the room";W
  518. 60 INPUT "What is the length of the room";L
  519. 70 LET P=2*L+2*W
  520. 80 INPUT "What is the ceiling height";H
  521. 90 LET A=P*H
  522. 100 LET N=A/30
  523.  
  524. Select a type of instruction from this list:
  525.  
  526. 1  INPUT - have the computer ask a question and await a keyboard
  527.            answer,
  528. 2  LET - have the computer evaluate an arithmetic expression,
  529.          evaluate a formula, or define the value of a constant,
  530. 3  PRINT - have the computer display a result and/or message, or
  531.            skip a line on the screen,
  532. 4  IF / THEN - have the computer make a decision based upon a
  533.                comparison,
  534. 5  (Labelled Line Number) - have the computer erect a signpost,
  535. 6  GOTO - have the computer detour to a signpost,
  536. 7  END - have the computer stop the processing of instructions,
  537. 8  LIST - display the complete list of instructions on the screen, or
  538. 9  There are no more instructions at this time; show action menu.
  539.  
  540. Select instruction type (1-9) ? 1
  541.  
  542. = = = = = - - - - - End of this portion of output - - - - - = = = = =
  543.  
  544.  
  545.      Every room must have at least one door!  You will not be using any
  546. wallpaper over on that door.  Every average sized door and window each
  547. has the same wall area as one half roll of wallpaper.  Thus, find the
  548. number of doors and windows in the room with two INPUT commands.  Add
  549. these two numbers to get the total number of openings in the room in a
  550. LET command, and subtract 1/2 a roll for each opening.  Call this the
  551. single rolls, as computer in another LET command:
  552.  
  553.  
  554. - - - - - = = = = =  PROGRAM output below = = = = = - - - - -
  555.  
  556. What question should the computer ask (or press [ENTER] for no
  557. question) ? How many doors are there
  558. What one or two letter label should the computer use to identify the
  559. answer to the question? nd
  560.  
  561. 10 REM *** START *** WALLPAPR.BAS / 01-27-1994 / 08:43:20
  562. 20 REM *** This BASIC program was generated by PROGRAM.EXE
  563. 30 REM *** A shareware program written by IRA F. KAVALER.
  564. 40 KEY OFF: CLS: REM *** Turn off F-key labels & clear screen.
  565. 50 INPUT "What is the width of the room";W
  566. 60 INPUT "What is the length of the room";L
  567. 70 LET P=2*L+2*W
  568. 80 INPUT "What is the ceiling height";H
  569. 90 LET A=P*H
  570. 100 LET N=A/30
  571. 110 INPUT "How many doors are there";ND
  572.  
  573. Select a type of instruction from this list:
  574.  
  575. 1  INPUT - have the computer ask a question and await a keyboard
  576.            answer,
  577. 2  LET - have the computer evaluate an arithmetic expression,
  578.          evaluate a formula, or define the value of a constant,
  579. 3  PRINT - have the computer display a result and/or message, or
  580.            skip a line on the screen,
  581. 4  IF / THEN - have the computer make a decision based upon a
  582.                comparison,
  583. 5  (Labelled Line Number) - have the computer erect a signpost,
  584. 6  GOTO - have the computer detour to a signpost,
  585. 7  END - have the computer stop the processing of instructions,
  586. 8  LIST - display the complete list of instructions on the screen, or
  587. 9  There are no more instructions at this time; show action menu.
  588.  
  589. Select instruction type (1-9) ? 1
  590.  
  591. What question should the computer ask (or press [ENTER] for no
  592. question) ? How many windows are there
  593. What one or two letter label should the computer use to identify the
  594. answer to the question? nw
  595.  
  596. 10 REM *** START *** WALLPAPR.BAS / 01-27-1994 / 08:43:20
  597. 20 REM *** This BASIC program was generated by PROGRAM.EXE
  598. 30 REM *** A shareware program written by IRA F. KAVALER.
  599. 40 KEY OFF: CLS: REM *** Turn off F-key labels & clear screen.
  600. 50 INPUT "What is the width of the room";W
  601. 60 INPUT "What is the length of the room";L
  602. 70 LET P=2*L+2*W
  603. 80 INPUT "What is the ceiling height";H
  604. 90 LET A=P*H
  605. 100 LET N=A/30
  606. 110 INPUT "How many doors are there";ND
  607. 120 INPUT "How many windows are there";NW
  608.  
  609. Select a type of instruction from this list:
  610.  
  611. 1  INPUT - have the computer ask a question and await a keyboard
  612.            answer,
  613. 2  LET - have the computer evaluate an arithmetic expression,
  614.          evaluate a formula, or define the value of a constant,
  615. 3  PRINT - have the computer display a result and/or message, or
  616.            skip a line on the screen,
  617. 4  IF / THEN - have the computer make a decision based upon a
  618.                comparison,
  619. 5  (Labelled Line Number) - have the computer erect a signpost,
  620. 6  GOTO - have the computer detour to a signpost,
  621. 7  END - have the computer stop the processing of instructions,
  622. 8  LIST - display the complete list of instructions on the screen, or
  623. 9  There are no more instructions at this time; show action menu.
  624.  
  625. Select instruction type (1-9) ? 2
  626. What one or two letter label should the computer use to identify the
  627. result of the formula? op
  628. Using one or two letter labels already established, what is the
  629. formula, arithmetic expression, or constant? nd+nw
  630.  
  631. 10 REM *** START *** WALLPAPR.BAS / 01-27-1994 / 08:43:20
  632. 20 REM *** This BASIC program was generated by PROGRAM.EXE
  633. 30 REM *** A shareware program written by IRA F. KAVALER.
  634. 40 KEY OFF: CLS: REM *** Turn off F-key labels & clear screen.
  635. 50 INPUT "What is the width of the room";W
  636. 60 INPUT "What is the length of the room";L
  637. 70 LET P=2*L+2*W
  638. 80 INPUT "What is the ceiling height";H
  639. 90 LET A=P*H
  640. 100 LET N=A/30
  641. 110 INPUT "How many doors are there";ND
  642. 120 INPUT "How many windows are there";NW
  643. 130 LET OP=ND+NW
  644.  
  645. Select a type of instruction from this list:
  646.  
  647. 1  INPUT - have the computer ask a question and await a keyboard
  648.            answer,
  649. 2  LET - have the computer evaluate an arithmetic expression,
  650.          evaluate a formula, or define the value of a constant,
  651. 3  PRINT - have the computer display a result and/or message, or
  652.            skip a line on the screen,
  653. 4  IF / THEN - have the computer make a decision based upon a
  654.                comparison,
  655. 5  (Labelled Line Number) - have the computer erect a signpost,
  656. 6  GOTO - have the computer detour to a signpost,
  657. 7  END - have the computer stop the processing of instructions,
  658. 8  LIST - display the complete list of instructions on the screen, or
  659. 9  There are no more instructions at this time; show action menu.
  660.  
  661. Select instruction type (1-9) ? 2
  662. What one or two letter label should the computer use to identify the
  663. result of the formula? sr
  664. Using one or two letter labels already established, what is the
  665. formula, arithmetic expression, or constant? n-op/2
  666.  
  667. 10 REM *** START *** WALLPAPR.BAS / 01-27-1994 / 08:43:20
  668. 20 REM *** This BASIC program was generated by PROGRAM.EXE
  669. 30 REM *** A shareware program written by IRA F. KAVALER.
  670. 40 KEY OFF: CLS: REM *** Turn off F-key labels & clear screen.
  671. 50 INPUT "What is the width of the room";W
  672. 60 INPUT "What is the length of the room";L
  673. 70 LET P=2*L+2*W
  674. 80 INPUT "What is the ceiling height";H
  675. 90 LET A=P*H
  676. 100 LET N=A/30
  677. 110 INPUT "How many doors are there";ND
  678. 120 INPUT "How many windows are there";NW
  679. 130 LET OP=ND+NW
  680. 140 LET SR=N-OP/2
  681.  
  682. Select a type of instruction from this list:
  683.  
  684. 1  INPUT - have the computer ask a question and await a keyboard
  685.            answer,
  686. 2  LET - have the computer evaluate an arithmetic expression,
  687.          evaluate a formula, or define the value of a constant,
  688. 3  PRINT - have the computer display a result and/or message, or
  689.            skip a line on the screen,
  690. 4  IF / THEN - have the computer make a decision based upon a
  691.                comparison,
  692. 5  (Labelled Line Number) - have the computer erect a signpost,
  693. 6  GOTO - have the computer detour to a signpost,
  694. 7  END - have the computer stop the processing of instructions,
  695. 8  LIST - display the complete list of instructions on the screen, or
  696. 9  There are no more instructions at this time; show action menu.
  697.  
  698. Select instruction type (1-9) ? 3
  699.  
  700. = = = = = - - - - - End of this portion of output - - - - - = = = = =
  701.  
  702.  
  703.      With all the necessary calculation completed it's time to display
  704. the results.  This requires the PRINT command.  The PRINT command can
  705. be used in four different ways:  1. to display only the value,  2. to
  706. display a message and the value,  3. to display only a message, and  4.
  707. to display a blank line (for clarity of display).
  708.  
  709.      Let's use two PRINT commands to display the answer as follows:
  710.  
  711.  
  712. - - - - - = = = = =  PROGRAM output below = = = = = - - - - -
  713.  
  714. Do you want to display ONLY a message or skip a line (Y/N) ? n
  715. What one or two letter label should the computer display on the screen?
  716. sr
  717. What message should the computer put before the label
  718. (press [ENTER] to omit message or skip a line)
  719. ? You will need
  720.  
  721. 10 REM *** START *** WALLPAPR.BAS / 01-27-1994 / 08:43:20
  722. 20 REM *** This BASIC program was generated by PROGRAM.EXE
  723. 30 REM *** A shareware program written by IRA F. KAVALER.
  724. 40 KEY OFF: CLS: REM *** Turn off F-key labels & clear screen.
  725. 50 INPUT "What is the width of the room";W
  726. 60 INPUT "What is the length of the room";L
  727. 70 LET P=2*L+2*W
  728. 80 INPUT "What is the ceiling height";H
  729. 90 LET A=P*H
  730. 100 LET N=A/30
  731. 110 INPUT "How many doors are there";ND
  732. 120 INPUT "How many windows are there";NW
  733. 130 LET OP=ND+NW
  734. 140 LET SR=N-OP/2
  735. 150 PRINT "You will need";SR
  736.  
  737. Select a type of instruction from this list:
  738.  
  739. 1  INPUT - have the computer ask a question and await a keyboard
  740.            answer,
  741. 2  LET - have the computer evaluate an arithmetic expression,
  742.          evaluate a formula, or define the value of a constant,
  743. 3  PRINT - have the computer display a result and/or message, or
  744.            skip a line on the screen,
  745. 4  IF / THEN - have the computer make a decision based upon a
  746.                comparison,
  747. 5  (Labelled Line Number) - have the computer erect a signpost,
  748. 6  GOTO - have the computer detour to a signpost,
  749. 7  END - have the computer stop the processing of instructions,
  750. 8  LIST - display the complete list of instructions on the screen, or
  751. 9  There are no more instructions at this time; show action menu.
  752.  
  753. Select instruction type (1-9) ? 3
  754.  
  755. Do you want to display ONLY a message or skip a line (Y/N) ? y
  756. What message should the computer put before the label
  757. (press [ENTER] to omit message or skip a line)
  758. ? single rolls of wallpaper.
  759.  
  760. 10 REM *** START *** WALLPAPR.BAS / 01-27-1994 / 08:43:20
  761. 20 REM *** This BASIC program was generated by PROGRAM.EXE
  762. 30 REM *** A shareware program written by IRA F. KAVALER.
  763. 40 KEY OFF: CLS: REM *** Turn off F-key labels & clear screen.
  764. 50 INPUT "What is the width of the room";W
  765. 60 INPUT "What is the length of the room";L
  766. 70 LET P=2*L+2*W
  767. 80 INPUT "What is the ceiling height";H
  768. 90 LET A=P*H
  769. 100 LET N=A/30
  770. 110 INPUT "How many doors are there";ND
  771. 120 INPUT "How many windows are there";NW
  772. 130 LET OP=ND+NW
  773. 140 LET SR=N-OP/2
  774. 150 PRINT "You will need";SR
  775. 160 PRINT "single rolls of wallpaper."
  776.  
  777. Select a type of instruction from this list:
  778.  
  779. 1  INPUT - have the computer ask a question and await a keyboard
  780.            answer,
  781. 2  LET - have the computer evaluate an arithmetic expression,
  782.          evaluate a formula, or define the value of a constant,
  783. 3  PRINT - have the computer display a result and/or message, or
  784.            skip a line on the screen,
  785. 4  IF / THEN - have the computer make a decision based upon a
  786.                comparison,
  787. 5  (Labelled Line Number) - have the computer erect a signpost,
  788. 6  GOTO - have the computer detour to a signpost,
  789. 7  END - have the computer stop the processing of instructions,
  790. 8  LIST - display the complete list of instructions on the screen, or
  791. 9  There are no more instructions at this time; show action menu.
  792.  
  793. Select instruction type (1-9) ? 7
  794.  
  795. = = = = = - - - - - End of this portion of output - - - - - = = = = =
  796.  
  797.  
  798.      The program is finished!  We now can optionally put an END command
  799. after the last instruction:
  800.  
  801.  
  802. - - - - - = = = = =  PROGRAM output below = = = = = - - - - -
  803.  
  804. 10 REM *** START *** WALLPAPR.BAS / 01-27-1994 / 08:43:20
  805. 20 REM *** This BASIC program was generated by PROGRAM.EXE
  806. 30 REM *** A shareware program written by IRA F. KAVALER.
  807. 40 KEY OFF: CLS: REM *** Turn off F-key labels & clear screen.
  808. 50 INPUT "What is the width of the room";W
  809. 60 INPUT "What is the length of the room";L
  810. 70 LET P=2*L+2*W
  811. 80 INPUT "What is the ceiling height";H
  812. 90 LET A=P*H
  813. 100 LET N=A/30
  814. 110 INPUT "How many doors are there";ND
  815. 120 INPUT "How many windows are there";NW
  816. 130 LET OP=ND+NW
  817. 140 LET SR=N-OP/2
  818. 150 PRINT "You will need";SR
  819. 160 PRINT "single rolls of wallpaper."
  820. 170 END
  821.  
  822. Select a type of instruction from this list:
  823.  
  824. 1  INPUT - have the computer ask a question and await a keyboard
  825.            answer,
  826. 2  LET - have the computer evaluate an arithmetic expression,
  827.          evaluate a formula, or define the value of a constant,
  828. 3  PRINT - have the computer display a result and/or message, or
  829.            skip a line on the screen,
  830. 4  IF / THEN - have the computer make a decision based upon a
  831.                comparison,
  832. 5  (Labelled Line Number) - have the computer erect a signpost,
  833. 6  GOTO - have the computer detour to a signpost,
  834. 7  END - have the computer stop the processing of instructions,
  835. 8  LIST - display the complete list of instructions on the screen, or
  836. 9  There are no more instructions at this time; show action menu.
  837.  
  838. Select instruction type (1-9) ? 9
  839.  
  840. = = = = = - - - - - End of this portion of output - - - - - = = = = =
  841.  
  842.  
  843.      To leave the instruction menu and go to the action menu selection
  844. instruction type 9 which is the "escape clause"!
  845.  
  846.  
  847. - - - - - = = = = =  PROGRAM output below = = = = = - - - - -
  848.  
  849. Select an action from this list:
  850.  
  851. 1  Start a new set of instructions (show instruction menu),
  852.    erasing the current set of instructions,
  853. 2  LOAD - retrieve a set of instructions previously saved on disk,
  854.           erasing the current set of instructions,
  855. 3  SAVE - save the current set of instructions on disk,
  856. 4  EDIT the instructions by ADDING instructions
  857.         after the last current instruction,
  858. 5  EDIT the instructions by REPLACING an instruction,
  859. 6  EDIT the instructions by DELETING an instruction,
  860. 7  EDIT the instructions by INSERTING an instruction
  861.         between two current instructions,
  862. 8  LIST - display the complete set of instructions on the screen, or
  863. 9  Terminate this program and return to a BASIC ready condition.
  864.  
  865. Select action type (1-9) ? 3
  866.  
  867. = = = = = - - - - - End of this portion of output - - - - - = = = = =
  868.  
  869.  
  870.      At the action menu the newly generated wallpaper program can be
  871. saved to disk by selection action type 3.  IF desired, the program name
  872. can be changed before saving, or by just pressing the ENTER key, the
  873. already established name WALLPAPR will be used:
  874.  
  875.  
  876. - - - - - = = = = =  PROGRAM output below = = = = = - - - - -
  877.  
  878. To use the existing filename WALLPAPR, press [Enter], or
  879. what is the name of this set of instructions (try to use 8 letters or
  880. less), and if you know what a file extension is, don't use it) ?
  881. The existing filename: WALLPAPR is being used.
  882. The actual filename used on this disk is:  WALLPAPR.BAS
  883. File open.................File closed.
  884.  
  885. 10 REM *** START *** WALLPAPR.BAS / 01-27-1994 / 08:43:20
  886. 20 REM *** This BASIC program was generated by PROGRAM.EXE
  887. 30 REM *** A shareware program written by IRA F. KAVALER.
  888. 40 KEY OFF: CLS: REM *** Turn off F-key labels & clear screen.
  889. 50 INPUT "What is the width of the room";W
  890. 60 INPUT "What is the length of the room";L
  891. 70 LET P=2*L+2*W
  892. 80 INPUT "What is the ceiling height";H
  893. 90 LET A=P*H
  894. 100 LET N=A/30
  895. 110 INPUT "How many doors are there";ND
  896. 120 INPUT "How many windows are there";NW
  897. 130 LET OP=ND+NW
  898. 140 LET SR=N-OP/2
  899. 150 PRINT "You will need";SR
  900. 160 PRINT "single rolls of wallpaper."
  901. 170 END
  902. Press [any key] to continue...
  903.  
  904. Select an action from this list:
  905.  
  906. 1  Start a new set of instructions (show instruction menu),
  907.    erasing the current set of instructions,
  908. 2  LOAD - retrieve a set of instructions previously saved on disk,
  909.           erasing the current set of instructions,
  910. 3  SAVE - save the current set of instructions on disk,
  911. 4  EDIT the instructions by ADDING instructions
  912.         after the last current instruction,
  913. 5  EDIT the instructions by REPLACING an instruction,
  914. 6  EDIT the instructions by DELETING an instruction,
  915. 7  EDIT the instructions by INSERTING an instruction
  916.         between two current instructions,
  917. 8  LIST - display the complete set of instructions on the screen, or
  918. 9  Terminate this program and return to a BASIC ready condition.
  919.  
  920. Select action type (1-9) ? 8
  921.  
  922. = = = = = - - - - - End of this portion of output - - - - - = = = = =
  923.  
  924.  
  925.      From either the instruction menu or the action menu you can
  926. display the program being generated by selecting type 8:
  927.  
  928.  
  929. - - - - - = = = = =  PROGRAM output below = = = = = - - - - -
  930.  
  931. 10 REM *** START *** WALLPAPR.BAS / 01-27-1994 / 08:43:20
  932. 20 REM *** This BASIC program was generated by PROGRAM.EXE
  933. 30 REM *** A shareware program written by IRA F. KAVALER.
  934. 40 KEY OFF: CLS: REM *** Turn off F-key labels & clear screen.
  935. 50 INPUT "What is the width of the room";W
  936. 60 INPUT "What is the length of the room";L
  937. 70 LET P=2*L+2*W
  938. 80 INPUT "What is the ceiling height";H
  939. 90 LET A=P*H
  940. 100 LET N=A/30
  941. 110 INPUT "How many doors are there";ND
  942. 120 INPUT "How many windows are there";NW
  943. 130 LET OP=ND+NW
  944. 140 LET SR=N-OP/2
  945. 150 PRINT "You will need";SR
  946. 160 PRINT "single rolls of wallpaper."
  947. 170 END
  948. Press [any key] to continue...
  949.  
  950. Select an action from this list:
  951.  
  952. 1  Start a new set of instructions (show instruction menu),
  953.    erasing the current set of instructions,
  954. 2  LOAD - retrieve a set of instructions previously saved on disk,
  955.           erasing the current set of instructions,
  956. 3  SAVE - save the current set of instructions on disk,
  957. 4  EDIT the instructions by ADDING instructions
  958.         after the last current instruction,
  959. 5  EDIT the instructions by REPLACING an instruction,
  960. 6  EDIT the instructions by DELETING an instruction,
  961. 7  EDIT the instructions by INSERTING an instruction
  962.         between two current instructions,
  963. 8  LIST - display the complete set of instructions on the screen, or
  964. 9  Terminate this program and return to a BASIC ready condition.
  965.  
  966. Select action type (1-9) ? 7
  967.  
  968. = = = = = - - - - - End of this portion of output - - - - - = = = = =
  969.  
  970.  
  971.      Whenever you write a program you always find points that you
  972. missed or want to enhance.  Two I found afterwards.  First, the user
  973. should be told that the dimensions of the room must be given in feet.
  974. Second, it would be nice to leave a blank line just before the program
  975. gives the answer to the problem.
  976.  
  977.      PROGRAM has the ability to edit the program being created.  Line
  978. can be deleted, new lines can be added, and lines can be replaced.  The
  979. action menu has these options available.  Action type 3 allows adding
  980. instruction in between existing instructions.  Use this twice to add
  981. the enhancements outlined above:
  982.  
  983.  
  984. - - - - - = = = = =  PROGRAM output below = = = = = - - - - -
  985.  
  986. Find the number in front of the instruction before which you want to
  987. INSERT:
  988.  
  989. 10 REM *** START *** WALLPAPR.BAS / 01-27-1994 / 08:43:20
  990. 20 REM *** This BASIC program was generated by PROGRAM.EXE
  991. 30 REM *** A shareware program written by IRA F. KAVALER.
  992. 40 KEY OFF: CLS: REM *** Turn off F-key labels & clear screen.
  993. 50 INPUT "What is the width of the room";W
  994. 60 INPUT "What is the length of the room";L
  995. 70 LET P=2*L+2*W
  996. 80 INPUT "What is the ceiling height";H
  997. 90 LET A=P*H
  998. 100 LET N=A/30
  999. 110 INPUT "How many doors are there";ND
  1000. 120 INPUT "How many windows are there";NW
  1001. 130 LET OP=ND+NW
  1002. 140 LET SR=N-OP/2
  1003. 150 PRINT "You will need";SR
  1004. 160 PRINT "single rolls of wallpaper."
  1005. 170 END
  1006. What is the number before the one to be INSERTED? 40
  1007.  
  1008. 40 KEY OFF: CLS: REM *** Turn off F-key labels & clear screen.
  1009.  
  1010. Are you sure (Y/N) ? y
  1011.  
  1012.  What is the new inserted instruction?
  1013.  
  1014. Select a type of instruction from this list:
  1015.  
  1016. 1  INPUT - have the computer ask a question and await a keyboard
  1017.            answer,
  1018. 2  LET - have the computer evaluate an arithmetic expression,
  1019.          evaluate a formula, or define the value of a constant,
  1020. 3  PRINT - have the computer display a result and/or message, or
  1021.            skip a line on the screen,
  1022. 4  IF / THEN - have the computer make a decision based upon a
  1023.                comparison,
  1024. 5  (Labelled Line Number) - have the computer erect a signpost,
  1025. 6  GOTO - have the computer detour to a signpost,
  1026. 7  END - have the computer stop the processing of instructions,
  1027. 8  LIST - display the complete list of instructions on the screen, or
  1028. 9  There are no more instructions at this time; show action menu.
  1029.  
  1030. Select instruction type (1-9) ? 3
  1031.  
  1032. Do you want to display ONLY a message or skip a line (Y/N) ? y
  1033. What message should the computer put before the label
  1034. (press [ENTER] to omit message or skip a line)
  1035. ? Enter the room size in feet.
  1036.  
  1037. 10 REM *** START *** WALLPAPR.BAS / 01-27-1994 / 08:43:20
  1038. 20 REM *** This BASIC program was generated by PROGRAM.EXE
  1039. 30 REM *** A shareware program written by IRA F. KAVALER.
  1040. 40 KEY OFF: CLS: REM *** Turn off F-key labels & clear screen.
  1041. 45 PRINT "Enter the room size in feet."
  1042.  
  1043. INSERTED
  1044.  
  1045.  
  1046. Select an action from this list:
  1047.  
  1048. 1  Start a new set of instructions (show instruction menu),
  1049.    erasing the current set of instructions,
  1050. 2  LOAD - retrieve a set of instructions previously saved on disk,
  1051.           erasing the current set of instructions,
  1052. 3  SAVE - save the current set of instructions on disk,
  1053. 4  EDIT the instructions by ADDING instructions
  1054.         after the last current instruction,
  1055. 5  EDIT the instructions by REPLACING an instruction,
  1056. 6  EDIT the instructions by DELETING an instruction,
  1057. 7  EDIT the instructions by INSERTING an instruction
  1058.         between two current instructions,
  1059. 8  LIST - display the complete set of instructions on the screen, or
  1060. 9  Terminate this program and return to a BASIC ready condition.
  1061.  
  1062. Select action type (1-9) ? 7
  1063.  
  1064. Find the number in front of the instruction before which you want to
  1065. INSERT:
  1066.  
  1067. 10 REM *** START *** WALLPAPR.BAS / 01-27-1994 / 08:43:20
  1068. 20 REM *** This BASIC program was generated by PROGRAM.EXE
  1069. 30 REM *** A shareware program written by IRA F. KAVALER.
  1070. 40 KEY OFF: CLS: REM *** Turn off F-key labels & clear screen.
  1071. 45 PRINT "Enter the room size in feet."
  1072. 50 INPUT "What is the width of the room";W
  1073. 60 INPUT "What is the length of the room";L
  1074. 70 LET P=2*L+2*W
  1075. 80 INPUT "What is the ceiling height";H
  1076. 90 LET A=P*H
  1077. 100 LET N=A/30
  1078. 110 INPUT "How many doors are there";ND
  1079. 120 INPUT "How many windows are there";NW
  1080. 130 LET OP=ND+NW
  1081. 140 LET SR=N-OP/2
  1082. 150 PRINT "You will need";SR
  1083. 160 PRINT "single rolls of wallpaper."
  1084. 170 END
  1085. What is the number before the one to be INSERTED? 140
  1086.  
  1087. 140 LET SR=N-OP/2
  1088.  
  1089. Are you sure (Y/N) ? y
  1090.  
  1091.  What is the new inserted instruction?
  1092.  
  1093. Select a type of instruction from this list:
  1094.  
  1095. 1  INPUT - have the computer ask a question and await a keyboard
  1096.            answer,
  1097. 2  LET - have the computer evaluate an arithmetic expression,
  1098.          evaluate a formula, or define the value of a constant,
  1099. 3  PRINT - have the computer display a result and/or message, or
  1100.            skip a line on the screen,
  1101. 4  IF / THEN - have the computer make a decision based upon a
  1102.                comparison,
  1103. 5  (Labelled Line Number) - have the computer erect a signpost,
  1104. 6  GOTO - have the computer detour to a signpost,
  1105. 7  END - have the computer stop the processing of instructions,
  1106. 8  LIST - display the complete list of instructions on the screen, or
  1107. 9  There are no more instructions at this time; show action menu.
  1108.  
  1109. Select instruction type (1-9) ? 3
  1110.  
  1111. Do you want to display ONLY a message or skip a line (Y/N) ? y
  1112. What message should the computer put before the label
  1113. (press [ENTER] to omit message or skip a line)
  1114. ?
  1115.  
  1116. 10 REM *** START *** WALLPAPR.BAS / 01-27-1994 / 08:43:20
  1117. 20 REM *** This BASIC program was generated by PROGRAM.EXE
  1118. 30 REM *** A shareware program written by IRA F. KAVALER.
  1119. 40 KEY OFF: CLS: REM *** Turn off F-key labels & clear screen.
  1120. 45 PRINT "Enter the room size in feet."
  1121. 50 INPUT "What is the width of the room";W
  1122. 60 INPUT "What is the length of the room";L
  1123. 70 LET P=2*L+2*W
  1124. 80 INPUT "What is the ceiling height";H
  1125. 90 LET A=P*H
  1126. 100 LET N=A/30
  1127. 110 INPUT "How many doors are there";ND
  1128. 120 INPUT "How many windows are there";NW
  1129. 130 LET OP=ND+NW
  1130. 140 LET SR=N-OP/2
  1131. 145 PRINT
  1132.  
  1133. INSERTED
  1134.  
  1135.  
  1136. Select an action from this list:
  1137.  
  1138. 1  Start a new set of instructions (show instruction menu),
  1139.    erasing the current set of instructions,
  1140. 2  LOAD - retrieve a set of instructions previously saved on disk,
  1141.           erasing the current set of instructions,
  1142. 3  SAVE - save the current set of instructions on disk,
  1143. 4  EDIT the instructions by ADDING instructions
  1144.         after the last current instruction,
  1145. 5  EDIT the instructions by REPLACING an instruction,
  1146. 6  EDIT the instructions by DELETING an instruction,
  1147. 7  EDIT the instructions by INSERTING an instruction
  1148.         between two current instructions,
  1149. 8  LIST - display the complete set of instructions on the screen, or
  1150. 9  Terminate this program and return to a BASIC ready condition.
  1151.  
  1152. Select action type (1-9) ? 3
  1153.  
  1154. = = = = = - - - - - End of this portion of output - - - - - = = = = =
  1155.  
  1156.  
  1157.      The newly edited program will have to be saved again.  Selection
  1158. action type 3 again to do this:
  1159.  
  1160.  
  1161. - - - - - = = = = =  PROGRAM output below = = = = = - - - - -
  1162.  
  1163. To use the existing filename WALLPAPR, press [Enter], or
  1164. what is the name of this set of instructions (try to use 8 letters or
  1165. less), and if you know what a file extension is, don't use it) ?
  1166. The existing filename: WALLPAPR is being used.
  1167. The actual filename used on this disk is:  WALLPAPR.BAS
  1168. File open...................File closed.
  1169.  
  1170. 10 REM *** START *** WALLPAPR.BAS / 01-27-1994 / 08:43:20
  1171. 20 REM *** This BASIC program was generated by PROGRAM.EXE
  1172. 30 REM *** A shareware program written by IRA F. KAVALER.
  1173. 40 KEY OFF: CLS: REM *** Turn off F-key labels & clear screen.
  1174. 45 PRINT "Enter the room size in feet."
  1175. 50 INPUT "What is the width of the room";W
  1176. 60 INPUT "What is the length of the room";L
  1177. 70 LET P=2*L+2*W
  1178. 80 INPUT "What is the ceiling height";H
  1179. 90 LET A=P*H
  1180. 100 LET N=A/30
  1181. 110 INPUT "How many doors are there";ND
  1182. 120 INPUT "How many windows are there";NW
  1183. 130 LET OP=ND+NW
  1184. 140 LET SR=N-OP/2
  1185. 145 PRINT
  1186. 150 PRINT "You will need";SR
  1187. 160 PRINT "single rolls of wallpaper."
  1188. 170 END
  1189. Press [any key] to continue...
  1190.  
  1191. Select an action from this list:
  1192.  
  1193. 1  Start a new set of instructions (show instruction menu),
  1194.    erasing the current set of instructions,
  1195. 2  LOAD - retrieve a set of instructions previously saved on disk,
  1196.           erasing the current set of instructions,
  1197. 3  SAVE - save the current set of instructions on disk,
  1198. 4  EDIT the instructions by ADDING instructions
  1199.         after the last current instruction,
  1200. 5  EDIT the instructions by REPLACING an instruction,
  1201. 6  EDIT the instructions by DELETING an instruction,
  1202. 7  EDIT the instructions by INSERTING an instruction
  1203.         between two current instructions,
  1204. 8  LIST - display the complete set of instructions on the screen, or
  1205. 9  Terminate this program and return to a BASIC ready condition.
  1206.  
  1207. Select action type (1-9) ? 9
  1208.  
  1209. = = = = = - - - - - End of this portion of output - - - - - = = = = =
  1210.  
  1211.  
  1212.      The WALLPAPR program is done for the time being.  Choose action
  1213. type 9 to quit PROGRAM.
  1214.  
  1215.      The files generated by PROGRAM can be LOADed under BASICA and run
  1216. independently of PROGRAM.  If the generated file is re-SAVEd under
  1217. BASICA in the ASCII format;  that is, using SAVE"file",a  it can be
  1218. reloaded under PROGRAM and edited.
  1219.  
  1220.      I tried to make PROGRAM self explanatory but it's hard for me to
  1221. tell if I was successful.  I don't think it is as easy to use as I
  1222. wanted, but then neither is programming a VCR!  (I'm very good at that
  1223. too!)
  1224.  
  1225.      There are some limitations, especially in error trapping, in the
  1226. program:
  1227.  
  1228. 1.   No attempt is made to analyze the arithmetic formula or
  1229.      expression, variable or constant that supplies a value to the LET
  1230.      command.
  1231.  
  1232. 2.   No attempt is made to analyze the logical expression in the
  1233.      IF...THEN command.
  1234.  
  1235. 3.   String, integer and double precision variables and constants are
  1236.      not supported.
  1237.  
  1238. 4.   Arrays (vectors; dimensioned, subscripted variables) are not
  1239.      supported.
  1240.  
  1241.  
  1242.      Why not try it and let me know how you make out.  To help where I
  1243. may have fallen short, I have included additional documentation file(s)
  1244. which were a manuscript for a computer manual I wrote a decade ago for
  1245. classes I was teaching on the Commodore VIC-20 and 64 systems.  I have
  1246. quickly edited the manuscript for the IBM system.  The manual was not
  1247. meant to be used alone, but with PROGRAM it should be complete.
  1248.  
  1249.  
  1250.      Here's the small print.
  1251.      -----------------------
  1252.  
  1253.      All versions of this program including its related files are being
  1254. distributed on an "AS IS" basis.  There is absolutely no stated or
  1255. implied guarantee or warrantee of usability for any purpose or
  1256. correctness of the formulas and procedures contained in any file.
  1257.  
  1258.      If you happen to discover an error in the program I will make
  1259. every attempt to correct the error as quickly as possible.  I am under
  1260. no obligation to replace nor make refunds for defective full versions
  1261. or demonstration/trial versions of the program.  I have to take this
  1262. posture as my cost to make even the simplest of corrections far
  1263. outweighs any monetary compensation received for the full version of
  1264. the program.
  1265.  
  1266.      If you require any special modifications to the program I will be
  1267. happy to discuss on an individual basis the cost of supplying modified
  1268. programs and documentation.
  1269.  
  1270.      The program was tested on Tandy models 1000 and 1000 SX using MS-
  1271. DOS 3.3;  IBM PS/2 models 50 and 80, using PC-DOS 3.3;  and a Compaq
  1272. Desk-Pro 486/33 using MS-DOS 6.0.
  1273.  
  1274.  
  1275.      And now a word from our sponsor.
  1276.      --------------------------------
  1277.  
  1278.      You can get the latest version of this program by registering the
  1279. program.  When you register I will also include any other demonstration
  1280. / trail programs that I have available.  Please send $20.00 for an IBM
  1281. compatible 5-1/4 or 3-1/2 inch 720 DS/DD or HD disk(s), your choice,
  1282. to:
  1283.  
  1284.                                 IRA F. KAVALER
  1285.                               671 East 78 Street
  1286.                            Brooklyn, New York 11236
  1287.  
  1288.  
  1289.      All inquiries that do not include the registration fee must be
  1290. accompanied by a stamped self addressed return envelope.
  1291.  
  1292.      I reserve the right to discontinue support for, change the terms,
  1293. or withdraw any part or all of this offer including but not limited to
  1294. the programs and its associated files at any time without giving prior
  1295. notice.
  1296.  
  1297.      No form of this program, registered or unregistered,  may be used
  1298. in commercial, educational, nor governmental applications without
  1299. written authorization or a site lease from the author;  such
  1300. authorization and/or site lease may require that a substantial fee be
  1301. paid to the author.
  1302.  
  1303.  
  1304.      73's, de WA2ZIR.
  1305.      ----------------
  1306.  
  1307.      I welcome your suggestions and comments about this product and
  1308. others.  I won't promise that good suggestions will be added to the
  1309. program, but they will be considered.
  1310.  
  1311.  
  1312. Thank you.
  1313.  
  1314.  
  1315.      Appendix.
  1316.      ---------
  1317.  
  1318. The operating systems, programs and companies mentioned in this file:
  1319. PKWARE, PKZIP, PKUNZIP, MS-DOS, PC-DOS, LIST, BROWSE, SIMCGA, Hercules,
  1320. Tandy Compaq, Arche, and IBM are all copyrights, trademarks, and/or
  1321. service marks of other individuals or other corporations.
  1322.  
  1323.  
  1324. >>>>>  End of File  <<<<<