home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format 17 / af017.adf / READ.ME < prev    next >
Text File  |  1978-01-21  |  5KB  |  190 lines

  1. Power BASIC Demo Editor
  2. =======================
  3.  
  4. This is a demo version of the editor included with Power BASIC. The
  5. full version of Power BASIC gives a fully integrated editing and
  6. compilation environment. The compiler is invoked by selecting compile
  7. from the program menu. The compilation options are then selected using
  8. the mouse from a standard AmigaDOS requester giving a flexible and
  9. easy-to-use interface.
  10.  
  11. After the fast compilation, any errors which occurred are reported back
  12. to the editor, so that each one may be corrected, simply by pressing
  13. Amiga-J or selecting 'Jump to Error' from the Program menu.
  14.  
  15. When a compilation is successful a program can be run directly from
  16. memory, using 'Run' from the Program menu.
  17.  
  18. The editor is easy to use with many commands including:
  19.  
  20. Cursor commands:
  21.         Use the cursor to move about your document plus:
  22.         Page up               - Ctrl-R or Shift-up arrow
  23.         Page down             - Ctrl-C or Shift-down arrow
  24.         Word left             - Shift-left arrow
  25.         Word right            - Shift-right arrow
  26.         Goto start of line    - Ctrl-left arrow
  27.         Goto end of line      - Ctrl-right arrow
  28.         Goto top of file      - Right-Amiga-T
  29.         Goto bottom of file   - Right-Amiga-B
  30.         Goto to a line        - Right-Amiga-G
  31.         
  32. Delete commands:
  33.         Delete line           - Ctrl-Y
  34.         UnDelete line         - Ctrl-U
  35.         Delete to end of line - Ctrl-Q
  36.         Delete all text       - New from Project menu
  37.  
  38. Block commands:
  39.         Begin block    - F1
  40.         End block      - F2
  41.         Save block     - F3
  42.         Copy block     - F4
  43.         Delete block   - Shift-F3
  44.         Paste block    - F5
  45.         Remember block - Shift-F4
  46.         Print block    - Right-Amiga-W
  47.  
  48. Disk commands:
  49.         Load text      - Right-Amiga-L
  50.         Save text as   - Right-Amiga-S
  51.         Save text      - Shift-right-Amiga-S
  52.         Insert text    - Right-Amiga-I
  53.         
  54. Search & Replace:
  55.         Search         - Right-Amiga-F
  56.         Replace        - Right-Amiga-R
  57.         Find next      - Right-Amiga-N
  58.         Find previous  - Right-Amiga-P
  59.  
  60. Preferences command - Preferences from Options menu:
  61.         Tab setting      - Set tab spacing
  62.         Text buffer size - Maximum text buffer size
  63.         Backups          - Selects whether backups are made 
  64.         Auto indent      - Auto-indentation mode
  65.         End of line      - Cursor wraps/stops at end of line
  66.         Auto full size   - Window is auto-opened full size when started
  67.         Save             - Save preferences to disk
  68.         
  69. The full version of Power BASIC also includes the ARP library so that a
  70. flexible file selector is always available in the editor.
  71.  
  72. The Power BASIC language is based on Microsoft QuickBASIC on the PC,
  73. giving you a very modern, extremely quick and easy-to-use system
  74. whilst being compatible with the AmigaBASIC interpreter.
  75.  
  76. There is now no need for an interpreter; development time is so swift
  77. that you will never want to use one again. The integrated environment
  78. and advanced features of Power BASIC make it a joy to use.
  79.  
  80. HiSoft Extend is an add-on library for Power BASIC that allows you to
  81. handle menus, gadgets and requesters with ease. Building up
  82. good-looking, professional and fast programs is a doddle.
  83.  
  84. The upgrade to Power BASIC is available directly from Future Publishing
  85.  
  86. Here's an example of the type of program that you can produce using
  87. Power BASIC:
  88.  
  89. 'The Towers of Hanoi program in Power BASIC
  90.  
  91. DEFINT a-z
  92.  
  93. CONST max_rings=20
  94. CONST left=1,middle=2,right=3
  95. CONST pole1=110,pole2=320,pole3=530
  96. CONST space=50
  97. CONST max_width=200
  98. CONST gap=10
  99. CONST full_height=200
  100.  
  101. SUB draw_ring(which_pole,start,size,type)
  102. SHARED ring_height
  103. STATIC xstart,ystart
  104.  
  105. SELECT CASE which_pole
  106.     CASE=1
  107.         xstart=pole1-(size)\2
  108.     CASE=2
  109.         xstart=pole2-(size)\2
  110.     CASE=3
  111.         xstart=pole3-(size)\2
  112. END SELECT
  113.  
  114. ystart=full_height-space-start*ring_height
  115.  
  116. IF type=0 THEN
  117.     LINE(xstart,ystart)-STEP(size,ring_height-2),0,bf
  118. ELSE
  119.     LINE(xstart,ystart)-STEP(size,ring_height-2),,bf
  120. END IF      
  121.           
  122. END SUB
  123.  
  124. SUB realmove(val source, val destination)
  125. SHARED poles(2), highest(3)
  126. STATIC ring_width,ystart
  127.  
  128. ring_width=poles(source,highest(source))
  129.  
  130. 'erase source ring
  131. draw_ring source,highest(source),ring_width,0
  132.  
  133. poles(source,highest(source))=0
  134. DECR highest(source)
  135.  
  136. 'draw destination ring
  137. INCR highest(destination)
  138. poles(destination,highest(destination))=ring_width
  139.  
  140. draw_ring destination,highest(destination),ring_width,2
  141.  
  142. END SUB
  143.  
  144. SUB move(val howmany, val source, val work, val destination)
  145.     IF howmany=1 THEN
  146.         realmove source,destination
  147.     ELSE
  148.         move howmany-1,source,destination,work
  149.         realmove source,destination
  150.         move howmany-1,work,source,destination
  151.     END IF
  152. END SUB
  153.  
  154. 'The actual start
  155. DO
  156.     LOCATE 1,2
  157.     INPUT "Number of rings to move: ",num_rings
  158. LOOP UNTIL num_rings>1 AND num_rings<=max_rings
  159.  
  160. ring_height=(full_height-2*space)\max_rings
  161.  
  162. WINDOW(1),"The Towers of Hanoi in HiSoft BASIC"
  163.  
  164. DIM poles(3,num_rings)
  165. DIM highest(3)
  166.  
  167. highest(1)=num_rings
  168.  
  169. 'initialise first pole
  170. FOR i=1 TO num_rings
  171.     poles(1,i)=max_width-(i-1)*(max_width\num_rings)
  172. NEXT i
  173.  
  174. 'draw first pole
  175. FOR i=1 TO num_rings
  176.     draw_ring 1,i,poles(1,i),2
  177. NEXT i
  178.  
  179. move num_rings,left,middle,right
  180.  
  181.  
  182. HiSoft
  183. The Old School
  184. Greenfield
  185. Bedford
  186. MK45 5DE
  187.  
  188. Phone: +44 525 718181
  189. Fax: +44 525 713716
  190.