| Prospero Extended Pascal 32-bit Edition for Windows 95/98/NT and later Implementation details |
|
|
Compiler features The fast one-pass compiler generates 32-bit flat model code, and provides a choice of language levels, giving compatibility with both the Pascal and Extended Pascal standards. Other compile-time options activate assertions or request inclusion of a variety of run-time checks (index bounds, pointers, variant usage, undefined references), call for additional outputs (cross-reference, assembly code), or invoke a special checking mode with additional warnings. Run-time support Programs produced with Prospero Extended Pascal can take advantage of a 32-bit address space and efficient arithmetic, as well as features such as long file names, Unicode characters, processes and threads. Exceptions can be trapped and handled using try statements. An extensive range of support routines is available in the library; in a number of cases these have been chosen or named to ease transfer of existing programs. Definitions are also provided which allow direct access from Pascal code to API types and functions. Some routines in the library have definitions built into the compiler as part of the language. In other cases, the definitions are supplied as interfaces ready to be imported; these provide access to a range of features such as memory-mapped files, directories, the console, threads and graphics. Predefined procedures and functions get, put, update, reset, rewrite, extend, bind, unbind, SeekWrite, SeekRead, SeekUpdate, read, readln, write, writeln, readstr, writestr, page, new, dispose, pack, unpack, GetTimeStamp, halt, setlength, close, connect, echo, inc, dec, newmem, dispmem, insert, delete, WideToStr, assert, move, exit, return, seed, abs, sqr, sin, cos, exp, ln, sqrt, arctan, arg, re, im, trunc, round, card, cmplx, polar, ord, chr, wchr, succ, pred, odd, eof, eoln, empty, position, LastPosition, binding, length, index, substr, trim, eq, lt, gt, ne, le, ge, date, time, concat, copy, pos, max, min, tan, arcsin, arccos, sinh, cosh, tanh, handleof, OpenRead, OpenWrite, fresult, addrof, taddrof, sizeof, FieldOffset, ltrim, random, rand, pi, HeapUsed, StackUsed, memavail, stkavail, IsDigit, IsAlpha, UpperCase, LowerCase, raise, RaiseUser, inc, dec, int, frac, testbit, setbit, clearbit, flipbit Procedures and functions defined in interfaces ArgC, ArgV, Beep, ChDir, CmdTail, Command, Delay, DeleteCritSect, DispFQList, ElapsedDays, ElapsedSecs, EnterCritSect, ExecPgm, ExecSilent, ExeKind, FileDelete, FileExists, FileRename, GetDir, GetEnvs, GetFileInfo, GetPathInfo, InitCharSet, InitializeCritSect, IOResult, LeaveCritSect, MakeFQList, MkDir, MMFAccess, MMFClose, MMFOpenRead, MMFOpenWrite, PackFTime, ParamCount, ParamStr, PgmName, Platform, ReadKey, RmDir, SearchPath, SetDrive, SetFileSize, SetPathAttr, SetPathDate, Sound, SplitFileName, StartThread, ThreadCount, TextNote, TextSeek, UnpackFTime, Wait, AssignCrt, AttrXY, CharXY, ClrEol, ClrScr, CursorVisible, DelLine, EndMessage, EscapeKey, GetKeyboard, GoToXY, InitScreen, Ink, InsLine, KbdChar, KeyFlags, KeyPressed, Paper, PutChar, PutChattr, PutCXY, PutString, ScreenFile, ScrollDown, ScrollUp, SetCursorOff, SetCursorOn, SetCursorShape, SetText, StartMessage, TextBackground, TextColor, TextFrame, TextMode, TextWindow, WhereX, WhereY, Window, GrParameters, GrDisplay, GrErase, GrReset, RGBColor, PaletteColor, DefineBrush, DefineThinPen, DefineWidePen, DefineFont, ChoosePen, ChooseBrush, ChooseFont, SetPenPosition, DrawLineTo, DrawArcTo, PlotPoints, PlotLines, PlotCurve, DefineShape, DrawShape, DrawText, GrFileName, InfoBox, YesNoBox. |
Modules Extended Pascal modules are building-blocks for programs and libraries. They supply definitions of constants, types, variables, procedures and functions by means of named "interfaces", and the implementation of the procedures and functions as object files. One or more interfaces can be exported by a module, and may then be imported by other modules or main programs. A compiled interface takes the form of a file, which is a self-contained representation of the exported entities; interfaces can be amalgamated when the originating modules are collected into a library. Data types The integer type is 32 bits; there are additional predeclared subranges for bytes and 16-bit words. The real type is 8 bytes (IEEE double precision), with an additional 4-byte shortreal. The complex type is 16 bytes. Dynamic strings may have up to 32K characters, a distinct shortstring type allowing up to 255 characters. Wide character and string types are provided for manipulating Unicode data. Arrays may be of any size that can be accommodated at run-time. Sets can be of any ordinal base type, including negative integers. Various data types, in particular arrays and strings, can have sizes that are parameterized at run-time. Operators In addition to the familiar set of arithmetic and relational operators, the standard includes exponentiation operators ** and POW, an operator >< for set symmetric difference, and the forms AND_THEN and OR_ELSE indicating Boolean operations which are to be evaluated no further than needed to obtain the result. The + operator is used to indicate string concatenation. This implementation also provides a REM operator (remainder), shift and additional logical operators SHL, SHR and XOR, and an aliassing notation. Library formats The implementation uses the extended Coff relocatable format, compatible with Microsoft development products. Pascal modules can be included in dynamic link libraries (DLLs) and the library manager, Prolib, will construct such libraries as well as static libraries. Availability A complete copy of Prospero Extended Pascal 32-bit Edition for Windows, with online documentation, can be downloaded. There are source and executable versions of a range of programs included, and the workbench contains a tutorial. |
|
|
|
|
Requirements: Intel based micro running 32-bit
Windows ® operating system. For conventional Pascal programming
the software is self-contained. To produce applications that use
the Windows API directly may also require an SDK. |
|