Prospero Pascal 5.2 Development Tools Pricing information

Prospero Pascal 5.2
Version iio 5.2 for OS/2 v1 and MS-DOS,
Version iid 5.2 for MS-DOS

Language features

Data types
1, 2 and 4-byte integers, 4 and 8-byte reals, char, boolean, enumerated, subranges, arrays, records with variant parts, dynamic length strings (1 to 255 bytes), null-terminated strings (1 to 32K bytes), sets (up to 256K elements), 4-byte pointers, files (text and non text).

Declarations
Variable initialization to constant at declaration.
Case-constant ranges and OTHERWISE in variant record declarations.

Statements
Assignment
Procedure call
GOTO (including jumps out of blocks)
Compound (BEGIN...END)
IF...THEN...ELSE...
CASE...OF...OTHERWISE
Case-constant ranges (m..n) allowed.
REPEAT...UNTIL...
WHILE...DO...
FOR...TO/DOWNTO...DO...

Operators

Arithmetic + - * / DIV MOD
 AND OR XOR NOT SHL SHR
Logical AND OR XOR NOT
 AND_THEN OR_ELSE
Comparison < = > <= <> >=
Set + - * IN [...]
String +

Separate compilation
SEGMENT (as well as PROGRAM)
COMMON (as well as VAR)
EXTERNAL,OSEXTERN (as well as FORWARD)

Lexical enhancements
Source file inserts ({$I filename})
Identifiers containing underscore (_)
Extended number constants (e.g. 2#10010)
Hex constants (e.g. 01FFH)
Longreal constants (e.g. 1.0D0)

Procedures and functions
Procedure and function declarations (fully recursive)
Value, VAR, procedural/functional and conformant array parameters

Predefined procedures and functions

reset, rewrite Standard file open.
append Open a file for appending.
update Open a file for updating.
assign Assign external name to file variable.
ramfile Assign a file variable to memory.
connect Connect a file variable to a handle.
redirect Redirect a file variable to new handle.
duplicate Duplicate a file handle.
read, readln, write,
writeln, get, put,
eof, eoln, page Standard read and write operations.
readm, writem Block read and write to a file.
handle Return the handle of an open file.
fresult Return status of a file variable.
fbuffer Change size of a file buffer.
echo Echo file output to console.
seek, position Random access for non-text files.
textnote, textpoint Random access for text-files.
close Close a file.
rename, erase Rename and delete a file.
checkfn, fstat, dstat Check validity and existence of a file or directory name.
exclusive, lock,
lockall, unlock,
unlockall File sharing.
new, dispose Standard memory allocation.
newmem, dispmem Memory allocation of arbitrary size.
memavail, stkavail Inquire memory and stack availability.
pack, unpack Standard packing and unpacking.
concat Concatenate one or more strings.
copy Copy part of a string.
insert, delete Insert in and delete part of a string.
length Length of a string.
pos Search string for given substring.
str, val Convert between numbers and strings.
execprog Execute a child program.
chain Chain a child program.
command Execute a shell command.
halt, exitprog Exit program, setting ERRORLEVEL.
exit End procedure or function.
getcomm Get command line parameters.
ord, chr, trunc, round Standard type conversions.
pred, succ, odd Predicates (including inverse of ord).
sqr, sqrt, abs, min,
max, exp, ln Elementary mathematical functions.
sin, cos, tan, arcsin,
arccos, arctan, sinh,
cosh, tanh Trigonometric and hyperbolic functions.
rand, seed Random number generator and seed.
testbit, setbit,
clearbit, flipbit Bit operations.
move Untyped variable or block move.
sizeof, addr, paddr Size and address of a variable.
date, time Inquire system date and time.
prompt User prompt function.

PASPC library
The PASPC graphics library provides text and graphics support for both DOS and OS/2. Under DOS, the library will use the BIOS for maximum compatibility, or bypass the BIOS for maximum speed.

Screen handling

InitScreen Initialize the graphics.
Adaptor Return the type of video adaptor.
SetScreenMode Set a particular screen mode.
ScreenMode Return the current screen mode.
ClrVideo Reset the current screen mode.
UseBIOS Declare whether to use BIOS or direct screen access.
AwaitRetrace Wait for a screen retrace
 (reduces snow on some older machines).

Graphics
All graphics may operate either on the whole screen, or just within a defined graphics window. A user-defined scale may be applied to graphics co-ordinates, making it easier to support several different screen modes.

SetGraphics Choose an appropriate graphics mode
 for the machine's adaptor.
GraphWindow Define a window to which all graphics are clipped.
GraphFrame Put a border around the graphwindow
FillWindow Fill the window with a specified colour.
ClipOn, Clipoff Enable and disable graphics window clipping.
XOROn, XOROff Enable and disable XOR plotting.
Scale Choose an x and y co-ordinate scale.
Plot Plot a point.
Pixel Return the colour of a point.
Draw Draw a line between two points.
DrawTo Draw a line from the end of the last line drawn.
SetFill Set a border and fill colour for the shape routines.

A range of shape routines that may be drawn or filled:-
Rectangle, Circle, Ellipse, Sector (pie-slice), Seg (circle segment), Triangle, Crescent and general polygon shape.

ScreenText Place text anywhere in the graphics window with
 characters of arbitrary width and height,
 using current border and fill colours.
FillShape Flood filling of any shape.
SaveWindow Save graphics window to disk.
RestoreWindow Restore graphics window from disk.

Palette manipulation routines:-
CGACoIor, CGAPalette, EGABorder, EGAPalette, EGABlink, VGAPalette, VGAFIash

Turtle graphics routines:-
SetHeading, Heading, TurnLeft, TurnRight, SetPenColor, PenDown, PenUp, SetPosition, XCor, YCor, TurtleHome, TurtleWindow, Forwd, Back.

Text
Text may cover the whole screen, or be confined to a text window. The first group of routines also work in graphics modes.

The following work in text and graphics modes:-

SetText Choose an appropriate text mode for the
 machine's adaptor.
Paper, Ink Set background and foreground text colors.
PutChar, PutChattr Put characters to the screen.
ScreenFile Allow a textfile to be assigned so that output is
 directed to the current text window.
ClrScr Clear the current text window.
ClrEol Clear to the end of the line.
DeILine Delete a line.
InsLine Insert a line.
TextFrame Draw a border around the current text window.
GotoXY Move the cursor.
WhereX, WhereY Return the cursor position.

The following work only in text modes:-

CursorOn Turn the cursor on.
CursorOff Turn the cursor off.
CursorShape Change the cursor shape.
CharXY, AttrXY Return the character and attribute of the character
 at the cursor position.
StartMessage Allow messages to be written to the screen within a
 defined text window.
EndMessage Remove a message from the screen, restoring the
 screen to its previous state.

A range of routines to produce forms and menus (text modes only):-

FormCreate Start a form.
FormString Add a fixed string to the form.
FormEdit Add an editable string to the form.
FormCycle Add a cycle to the form.
FormDo User interactive processing of form.
MenuCreate Create the menu bar.
MenuDisplay Display the menu bar.
MenuAdd Add an item to the menu.
MenuChange Change a menu item.
MenuSelect Select a menu header.
MenuSelectability Make a menu item dimmed.
MenuDo Process menu interactively with user.

Keyboard facilities
KeyPressed, EscapeKey, GetKeyboard, KeyFlags.

Communications facilities
InitComm, WriteComm, ReadComm, CommStatus.

Sound facilities
Sound, SoundOff, Beep.

PASDOS library

The PASDOS library provides easy access to many of the operating-system facilities, and enables programs to be easily ported between DOS, OS/2, and other Prospero Pascal implementations.

RetCode Report on success of PASDOS routine.
ClearScr Clear the screen.
ClearEol Clear to the end of the line.
CursorXY Move the cursor to a given position.
Cstat Check to see if a key has been pressed.
ConSingle Read keyboard character, with echo.
ConSilent Read keyboard character, no echo.
Wait Delay for given time.
GetTimeStamp Get system date and time.
SetTime Set system date and time.
DateString Convert date to string.
TimeString Convert time to string.
GetDrive Get current drive.
SetDrive Set current drive.
GetVolName Get volume name.
ChDir Change directory.
MkDir Make directory.
RmDir Remove directory.
GetDir Get current directory.
GetFileAttr Get file attributes.
SetFileAttr Change file attributes.
FDate Get date and time of file.
MakeFQList Get list of files satisfying wildcard.
GetEnvS Get environment string.
SetEnvS Set environment string.
NewEnv Make a copy of environment strings.
ProgNam Get executing program's name.
FindFile Search for file.
SBreak Install safe CTRL-C handler.
QBreak See if CTRL-C has been detected.
RBreak Restore default CTRL-C handler.
SetRawMode Set console to raw mode.
SetCookedMode Set console to cooked mode.
CPUTyp Type of processor of machine.
VerNum Operating system version number.
Sys1 DOS function call.
SysCall General interrupt.

Error handling library

The error handling routines allow robust programs to be developed, giving the programmer wide flexibility.

_excep Return the most recent exception.
_error_split Split an exception into Class and SubClass.
_derrno Return the last OS error.
_errchk Check for errors.
_mask_set Mask out some exceptions.
_mask_get Get current error mask.
_errec_ptr Return pointer to error record.
_herr Report an error.
_user_error Force user defined error.

Parallel library

This library contains procedures that exploit the multi-tasking aspects of OS/2, and are not available under DOS. Although similar to the OS/2 API routines, these routines are much simpler to use - the StartThread routine will create and initialize a stack for the thread, and will automatically remove it when the thread procedure terminates.

StartThread Start the nominated procedure as a thread. The
 thread will terminate when the procedure terminates.
Startprog Asynchronous execution of a child program.

Interfacing with OS/2

Virtually all OS/2 API functions may be called directly, using the supplied function and type definitions. A compiler option allows outer-level procedures to preserve DS and use the default data segment, enabling them to be called directly from Presentation Manager.


Pricing and Contact information.


Prospero Pascal 5.2 Development Tools Pricing information