home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / vpfeat.inf (.txt) < prev    next >
OS/2 Help File  |  1996-07-22  |  18KB  |  352 lines

  1.  
  2. ΓòÉΓòÉΓòÉ 1. Introduction and Ordering ΓòÉΓòÉΓòÉ
  3.  
  4. Virtual Pascal is a professional quality 32-bit Object Pascal compiler for OS/2 
  5. version 2.0 or later. It includes both a command line compiler and an 
  6. Integrated Development Environment (IDE) with fully integrated debugger. VP can 
  7. be used to develop both text mode and Presentation Manager applications for 
  8. OS/2 and to port existing software products written in Borland Pascal from DOS 
  9. to OS/2. 
  10.  
  11. This text is meant as an overview of the key features of Virtual Pascal, as 
  12. well as touch on the subject of further development. For descriptions on how to 
  13. use a specific feature, please refer to the relevant sections in Volume 2 of 
  14. this manual. 
  15.  
  16. Inspired by Borland Pascal and Turbo Debugger, VP/2 offers two distinct 
  17. versions of the powerful integrated development environment. The two 
  18. environments look very much the same and share most capabilities, but serve two 
  19. different purposes. 
  20.  
  21. The text-only version of the VP/2 IDE runs on any computer running OS/2 v2.0 or 
  22. later, even without the OS/2 Presentation Manager installed. It runs either in 
  23. full screen mode or in any size window on the OS/2 desktop and offers the 
  24. fastest possible operation. The drawback of this environment is the fact that 
  25. OS/2's design, with only a single PM message queue, makes the writing and 
  26. debugging of Presentation Manager applications difficult . 
  27.  
  28. The PM version of the VP/2 IDE was written to work around this design 
  29. limitation of OS/2, allowing you to run and debug Presentation Manager 
  30. applications without fear of crashing the entire system. In addition to this, 
  31. VP/PM offers a nice graphical speedbar, whose smart-icons give quick access to 
  32. the most commonly used features of the IDE with only a single click of the 
  33. mouse. VPPM requires OS/2 Presentation Manager and does not work if this is not 
  34. present. 
  35.  
  36. Apart from the differences noted above, the two IDE versions remain identical 
  37. in both features and usage. 
  38.  
  39. To order VP/2, please contact fPrint UK Ltd on one of the addresse below. At 
  40. the time of writing this (8 April 1996), the price of Virtual Pascal for OS/2 
  41. v1.00 is ╨¼165 + shipping. 
  42.  
  43.   fPrint UK Ltd
  44.   Cambridge House
  45.   100 Cambridge Grove
  46.   Hammersmith
  47.   London W6 0LE
  48.   United Kingdom
  49.  
  50.   Phone       +44 (0)181 563 2359
  51.   Fax         +44 (0)181 563 2361
  52.   BBS         +44 (0)181 563 8624
  53.  
  54.   e-mail      sales@fprint.co.uk
  55.   CompuServe  GO FPRINT or GO OS2BVEN section 6
  56.   FidoNet     2:254/283 or the VPASCAL conference
  57.  
  58.  
  59. ΓòÉΓòÉΓòÉ 2. Key IDE Features ΓòÉΓòÉΓòÉ
  60.  
  61. IDE means Integrated Development Environment and covers the visible parts of 
  62. Virtual Pascal for OS/2.  The IDE is where you write your programs and where 
  63. your programs are debugged - in other words, a very important component. 
  64.  
  65.      VP/2 compiles in the background. While compilation is in progress, you 
  66.       can continue to edit, browse, read online help, etc. 
  67.  
  68.      The editor allows multiple open windows, in each of which text files of 
  69.       any size can be edited. Special features worth mentioning include: 
  70.  
  71.         -  Unlimited number of Undo/Redo operations. 
  72.         -  All block operations work with 3 block types: Line, Columnar and 
  73.            Stream. 
  74.         -  Clipboard operations: Cut, Copy and Paste. VP/PM uses the OS/2 
  75.            clipboard, making cut/paste between VP and other applications easy. 
  76.         -  Full Pascal syntax highlighting. Reserved words, numbers, text 
  77.            strings, comments and assembler statements are shown in their own 
  78.            configurable colour. 
  79.         -  Search and Replace with regular expressions. 
  80.         -  Incremental search facility. 
  81.         -  Mouse support. Right-clicking anywhere gives you an intuitive pop-up 
  82.            menu offering quick access to some commonly used features. 
  83.         -  Full keystroke macro support, including a Macro List dialog box that 
  84.            displays currently defined keystroke macros and lets you add, remove 
  85.            and edit macros. 
  86.  
  87.      Context-sensitive help system, including help for the IDE, the compiler 
  88.       and all OS/2 API function calls defined in VP/2 interface units. 
  89.  
  90.      Topic search from editor and help windows. 
  91.  
  92.      Search for text in the current topic, index or in all topics with Case 
  93.       Sensitive and Clipboard Copy and Copy Example commands. 
  94.  
  95.      The text-mode IDE runs in a window on the OS/2 desktop and can have any 
  96.       size up to 250x50 characters. Set your desired screen size with the OS/2 
  97.       mode command and select Options|Environment|Preferences|Keep Original to 
  98.       make VP run without resizing the window. 
  99.  
  100.      VP/PM allows dynamic sizing of the work area. When the window is resized, 
  101.       the editor windows are resized to fit the new size. The size and font is 
  102.       saved when VP/PM is exited and restored when it is next started. 
  103.  
  104.      The Integrated Debugger is a source level debugger that uses the Editor 
  105.       windows to facilitate source code tracking while executing. 
  106.  
  107.  
  108. ΓòÉΓòÉΓòÉ 3. Key Debugger Features ΓòÉΓòÉΓòÉ
  109.  
  110. The debugger is that part of Virtual Pascal which allows you to find any 
  111. problems in your programs.  Having a powerful debugger with many different 
  112. views is a big advantage when finding bugs in real-world programs - and the 
  113. VP/2 built-in debugger offers  wide selection of debugger features to use and 
  114. choose from... 
  115.  
  116.      If the program being debugged fails with a run-time error or an 
  117.       exception, the source file containing the error is loaded and the cursor 
  118.       is positioned to the error location. If no source code is available, or 
  119.       debugging information is disabled, the CPU window is displayed instead, 
  120.       with the cursor moved to the offending instruction. 
  121.  
  122.      Sophisticated source tracing algorithm that allows tracing of complex 
  123.       lines and even exceptions and exception handlers at high speed. 
  124.  
  125.      Watch window showing the value of variables or even complex expressions. 
  126.       The window is automatically updated whenever necessary during program 
  127.       execution. 
  128.  
  129.      Call stack window, showing the call stack, including parameter values. 
  130.  
  131.      Breakpoints window. In addition to execution breakpoints it is possible 
  132.       to set up to four datapoints (supported by the 386 and later hardware), 
  133.       each having a condition and a pass count for triggering it and an action 
  134.       that can be either Break or Log. 
  135.  
  136.      Register window that shows the values of CPU registers and flags and 
  137.       allows changing them. 
  138.  
  139.      Numeric Coprocessor window displaying the Stack registers, the Control 
  140.       register and the Status register panes showing the state of the x87 
  141.       coprocessor and lets you change it. 
  142.  
  143.      Dump window that can show the memory in all Pascal integer and floating 
  144.       point formats. 
  145.  
  146.      Object Hierarchy window, which shows an outline of your currently defined 
  147.       object hierarchy. Two different hierarchies are established; one for each 
  148.       object model supported by VP/2 and both are displayed in this window. 
  149.  
  150.      Inspector window, which allows the inspection of complex structured 
  151.       variables or types in an efficient manner. 
  152.  
  153.      Symbols window. Shows a list of all global and local symbols (types, 
  154.       constants, variables, procedures, functions) including their current 
  155.       values. The incremental search facility makes it easy to locate a 
  156.       specific symbol. 
  157.  
  158.      CPU window with Code, Data, Register and Stack panes displays the source 
  159.       lines and the corresponding disassembled instructions. The code can be 
  160.       patched during execution using a built-in assembler similar to the one 
  161.       available in asm..end statements in a program. 
  162.  
  163.      Log window collecting information about program flow (Module load, thread 
  164.       creation and termination, exceptions, breakpoints, user comments, etc). 
  165.       The Log window can also log expressions from Log-Points, which are 
  166.       similar to breakpoints, but log an expression instead of interrupting 
  167.       program execution. 
  168.  
  169.      Evaluate/Modify dialog, used to evaluate expressions and modify the value 
  170.       of variables at run-time. 
  171.  
  172.      Messages window, containing information about compilation and linking 
  173.       progress. 
  174.  
  175.      Threads dialog lets you examine all current program threads and allows 
  176.       you to freeze or resume them. 
  177.  
  178.      Exceptions dialog which lists all OS/2 system exceptions and allows you 
  179.       to specify whether the debugger should handle a particular exception or 
  180.       if the user program is responsible for handling it. This can be 
  181.       particularly useful for catching hard-to find bugs. 
  182.  
  183.      Unit dialog list, listing all units used by the program along with 
  184.       include files. If a unit or an include file is selected, the source file 
  185.       is loaded into an editor window. 
  186.  
  187.      The IDE can be used as a high speed assembler level debugger. Any 16- or 
  188.       32- bit OS/2 executable can be loaded into the IDE using the File|Load 
  189.       Program menu item. 
  190.  
  191.      For debugging Presentation Manager programs, VP/2 features both Hard and 
  192.       Soft PM debugging mode.  In the Hard debugging mode, the PM application 
  193.       being debugged is guaranteed to receive all messages in the same sequence 
  194.       as it would without the debugger running.  In Hard mode, all other 
  195.       processes in the system are suspended. 
  196.  
  197.  
  198. ΓòÉΓòÉΓòÉ 4. Key Compiler Features ΓòÉΓòÉΓòÉ
  199.  
  200. The compiler of a Pascal environment is really what it is all about.  The 
  201. compiler is the component which translates your Pascal source code into 
  202. efficient machine-code language and makes a program out of a text file. 
  203.  
  204. The VP/2 compiler is both powerful, fast and feature-rich, as can be seen from 
  205. the following: 
  206.  
  207.      The compiler is very fast and generates efficient and small executables. 
  208.       On a fast machine, VP/2 compiles about 300.000 lines of Pascal source 
  209.       code per minute. 
  210.  
  211.      Borland Pascal version 7.0 compatible including the latest extensions: 
  212.       Open array parameters, Open strings, Null-terminated strings, Dynamic 
  213.       methods and Small (integer sized) sets. 
  214.  
  215.      Borland Delphi v1.0 compatible. All language extensions introduced by 
  216.       Delphi v1.0 are available in VP/2: 
  217.  
  218.         -  The new object model (class), 
  219.         -  Exceptions (try..except, try..finally, raise), 
  220.         -  Result variable to assign and manipulate function result values, 
  221.         -  Run-Time Type Information (RTTI), 
  222.         -  Functions can return results of any type except file types, 
  223.         -  Open Array constructors, 
  224.         -  Method pointers, 
  225.         -  Type variant open array parameters. 
  226.  
  227.      Some Delphi v2.0 key features are supported: 
  228.  
  229.         -  Local thread storage using threadvars, 
  230.         -  The Currency floating point type is supported, 
  231.         -  Unit finalization parts, 
  232.         -  Double slash (//) comments, 
  233.         -  The assembler directive is not required for assembler procedures and 
  234.            functions. 
  235.  
  236.      Versatile Run-Time Library.  The Crt, Dos, WinCrt, WinDos, Printers and 
  237.       Strings Borland-Pascal compatible units are included, as are the Math, 
  238.       Classes, SysUtils and TypInfo Delphi v2-compatible units. 
  239.  
  240.      Built-in intelligent Make and Build tools. 
  241.  
  242.      386/486/Pentium capable built-in assembler (BASM). 
  243.  
  244.      Powerful optimizations can be enabled, making the code output by VP/2 
  245.       both very small and very fast.  A sophisticated register allocation 
  246.       routine allows commonly used variables to reside 100% in registers for 
  247.       optimum performance and speed. 
  248.  
  249.      VPC can generate object files, object libraries or readable assembly 
  250.       source that can be compiled by TASM (Turbo Assembler) 3.0+ or MASM 
  251.       (Microsoft Assembler) 6.0a+ to obtain equivalent object files. This 
  252.       allows you to mix code written in Virtual Pascal with code written in 
  253.       other languages. 
  254.  
  255.      VPC supports the Pascal, C, StdCall and far16 Pascal (without thunking) 
  256.       calling conventions, allowing: 
  257.  
  258.         -  All OS/2 API functions to be called directly without special 
  259.            interface libraries. 
  260.         -  OS/2 Exception handlers, Presentation Manager window functions, etc, 
  261.            to be written in Pascal. 
  262.         -  16-bit OS/2 1.x API functions to be called directly without any 
  263.            special interface thunk libraries. 
  264.  
  265.      Direct I/O port and memory access through the Port and Mem arrays. 
  266.  
  267.      Standard units are highly compatible with the DOS protected mode and 
  268.       Windows platforms of Borland Pascal. 
  269.  
  270.      VP/2 features Smart Linking, which lets you create tiny executables even 
  271.       without resorting to the use of DLLs. "Smart Linking" means that unused 
  272.       variables, procedures, functions and objects are not linked into the 
  273.       executable. Note, that source level debugging in the IDE is disabled for 
  274.       programs linked with Smart Linking enabled. 
  275.  
  276.      VP/2 can generate dynamic link libraries (DLL), usable from VP/2 programs 
  277.       or programs written in another language, such as C or C++. 
  278.  
  279.      Every definition in the interface section of a unit, including variables, 
  280.       typed constants, procedures, function and objects can be exported to a 
  281.       DLL and be used by any program using the DLL. This allows for the 
  282.       creation of DLLs for complex object-oriented libraries like Turbo Vision, 
  283.       Object professional or even the Delphi Visual Component Library. 
  284.  
  285.      No 64kB limits on either code segment, data segment or symbol sizes. 
  286.  
  287.      The ampersand character (&) is allowed as a replacement for the dollar 
  288.       sign ($) in compiler directives. This can be used to specify Virtual 
  289.       Pascal specific directives: other Pascal compilers, such as Borland 
  290.       Pascal, will treat these as ordinary comments. 
  291.  
  292.      All Borland Pascal compiler directives are accepted. The ones that have 
  293.       no Virtual Pascal equivalents are ignored. $A is equivalent to 
  294.       $AlignData. 
  295.  
  296.      A number of Virtual Pascal specific compiler directives are supported: 
  297.       AlignCode, AlignData, AlignRec, Asm, Cdecl, Far16, Frame, G3, G4, G5, 
  298.       Optimize, OrgName, PureInt, SmartLink, Speed, StdCall, Zd. 
  299.  
  300.      Long file names are supported by the run-time library: The size of the 
  301.       file variables has been increased to hold a long file name. The PathStr, 
  302.       DirStr, NameStr, ExtStr, SearchRec types in the Dos/WinDos units have 
  303.       been modified accordingly. 
  304.  
  305.      A program (.EXE) or a library (.DLL) can use either the static or a 
  306.       dynamic version of any unit it uses. If using the static version, the 
  307.       unit's object file is linked into the executable. If the dynamic version 
  308.       is used, the program requires the DLL to run. Full source level 
  309.       integrated debugging support is offered whichever method is used. 
  310.  
  311.      After VP/2 has been installed, two DLLs are immediately available: 
  312.  
  313.         -  VPRTL100.DLL including the System, Crt, Dos and Strings units. 
  314.         -  TV201.DLL includes all Turbo Vision units. 
  315.  
  316.      Interface units providing access to all OS/2 API calls are availble: 
  317.  
  318.         -  Os2Base:    Base OS/2 API calls and 16-bit OS/2 1.x API (Vio, Kbd, 
  319.            Mou, Mon and Nls calls). 
  320.         -  Os2PmApi:   All Presentation Manager API calls. 
  321.         -  Os2Rexx:    All REXX API calls. 
  322.         -  Os2Def:    Definitions of commonly used types and constants 
  323.  
  324.  
  325. ΓòÉΓòÉΓòÉ 5. Program Examples ΓòÉΓòÉΓòÉ
  326.  
  327. More than 100 examples of programming in VP/2 is included on the CD-ROM. The 
  328. examples are built with the real world in mind, and attempt to exemplify 
  329. situations which are either difficult or illustrate some aspect of OS/2 
  330. programming with VP/2. 
  331.  
  332.      All Turbo Pascal examples can be compiled by Virtual Pascal with minor 
  333.       changes (BreakOut, TVDemo, TVEdit, TVFM, etc.) The more interesting ones 
  334.       are included as OS/2 executables. 
  335.  
  336.      Examples that show the use of the standard units Dos, WinDos, Crt and 
  337.       WinCrt are included both as source code and as executables. Two 
  338.       Presentation Manager programs, the Triplex game and the Clock application 
  339.       are also available. 
  340.  
  341.      All relevant examples from the excellent book "The Art of OS/2 Warp 
  342.       Programming" are included with source code. The examples are included 
  343.       both as executables and with full Pascal source code and demonstrate many 
  344.       different aspects of programming for OS/2. 
  345.       Getting the above mentioned book is highly recommended in order to get 
  346.       the most of the examples provided. 
  347.  
  348.      Two examples also demonstrate the excellent compatibility with Delphi. 
  349.       ClsDemo and SysDemo demonstrate more than 100 functions from Classes and 
  350.       SysUtils, respectively - and compile with both Virtual Pascal and Delphi 
  351.       2. 
  352.