home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Format 17
/
af017.adf
/
READ.ME
< prev
next >
Wrap
Text File
|
1978-01-21
|
5KB
|
190 lines
Power BASIC Demo Editor
=======================
This is a demo version of the editor included with Power BASIC. The
full version of Power BASIC gives a fully integrated editing and
compilation environment. The compiler is invoked by selecting compile
from the program menu. The compilation options are then selected using
the mouse from a standard AmigaDOS requester giving a flexible and
easy-to-use interface.
After the fast compilation, any errors which occurred are reported back
to the editor, so that each one may be corrected, simply by pressing
Amiga-J or selecting 'Jump to Error' from the Program menu.
When a compilation is successful a program can be run directly from
memory, using 'Run' from the Program menu.
The editor is easy to use with many commands including:
Cursor commands:
Use the cursor to move about your document plus:
Page up - Ctrl-R or Shift-up arrow
Page down - Ctrl-C or Shift-down arrow
Word left - Shift-left arrow
Word right - Shift-right arrow
Goto start of line - Ctrl-left arrow
Goto end of line - Ctrl-right arrow
Goto top of file - Right-Amiga-T
Goto bottom of file - Right-Amiga-B
Goto to a line - Right-Amiga-G
Delete commands:
Delete line - Ctrl-Y
UnDelete line - Ctrl-U
Delete to end of line - Ctrl-Q
Delete all text - New from Project menu
Block commands:
Begin block - F1
End block - F2
Save block - F3
Copy block - F4
Delete block - Shift-F3
Paste block - F5
Remember block - Shift-F4
Print block - Right-Amiga-W
Disk commands:
Load text - Right-Amiga-L
Save text as - Right-Amiga-S
Save text - Shift-right-Amiga-S
Insert text - Right-Amiga-I
Search & Replace:
Search - Right-Amiga-F
Replace - Right-Amiga-R
Find next - Right-Amiga-N
Find previous - Right-Amiga-P
Preferences command - Preferences from Options menu:
Tab setting - Set tab spacing
Text buffer size - Maximum text buffer size
Backups - Selects whether backups are made
Auto indent - Auto-indentation mode
End of line - Cursor wraps/stops at end of line
Auto full size - Window is auto-opened full size when started
Save - Save preferences to disk
The full version of Power BASIC also includes the ARP library so that a
flexible file selector is always available in the editor.
The Power BASIC language is based on Microsoft QuickBASIC on the PC,
giving you a very modern, extremely quick and easy-to-use system
whilst being compatible with the AmigaBASIC interpreter.
There is now no need for an interpreter; development time is so swift
that you will never want to use one again. The integrated environment
and advanced features of Power BASIC make it a joy to use.
HiSoft Extend is an add-on library for Power BASIC that allows you to
handle menus, gadgets and requesters with ease. Building up
good-looking, professional and fast programs is a doddle.
The upgrade to Power BASIC is available directly from Future Publishing
Here's an example of the type of program that you can produce using
Power BASIC:
'The Towers of Hanoi program in Power BASIC
DEFINT a-z
CONST max_rings=20
CONST left=1,middle=2,right=3
CONST pole1=110,pole2=320,pole3=530
CONST space=50
CONST max_width=200
CONST gap=10
CONST full_height=200
SUB draw_ring(which_pole,start,size,type)
SHARED ring_height
STATIC xstart,ystart
SELECT CASE which_pole
CASE=1
xstart=pole1-(size)\2
CASE=2
xstart=pole2-(size)\2
CASE=3
xstart=pole3-(size)\2
END SELECT
ystart=full_height-space-start*ring_height
IF type=0 THEN
LINE(xstart,ystart)-STEP(size,ring_height-2),0,bf
ELSE
LINE(xstart,ystart)-STEP(size,ring_height-2),,bf
END IF
END SUB
SUB realmove(val source, val destination)
SHARED poles(2), highest(3)
STATIC ring_width,ystart
ring_width=poles(source,highest(source))
'erase source ring
draw_ring source,highest(source),ring_width,0
poles(source,highest(source))=0
DECR highest(source)
'draw destination ring
INCR highest(destination)
poles(destination,highest(destination))=ring_width
draw_ring destination,highest(destination),ring_width,2
END SUB
SUB move(val howmany, val source, val work, val destination)
IF howmany=1 THEN
realmove source,destination
ELSE
move howmany-1,source,destination,work
realmove source,destination
move howmany-1,work,source,destination
END IF
END SUB
'The actual start
DO
LOCATE 1,2
INPUT "Number of rings to move: ",num_rings
LOOP UNTIL num_rings>1 AND num_rings<=max_rings
ring_height=(full_height-2*space)\max_rings
WINDOW(1),"The Towers of Hanoi in HiSoft BASIC"
DIM poles(3,num_rings)
DIM highest(3)
highest(1)=num_rings
'initialise first pole
FOR i=1 TO num_rings
poles(1,i)=max_width-(i-1)*(max_width\num_rings)
NEXT i
'draw first pole
FOR i=1 TO num_rings
draw_ring 1,i,poles(1,i),2
NEXT i
move num_rings,left,middle,right
HiSoft
The Old School
Greenfield
Bedford
MK45 5DE
Phone: +44 525 718181
Fax: +44 525 713716