| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494 |
- Protected-mode TopSpeed Modula-2 Release notes version 3.10
- ================================ ==========================
- This document contains information on the following:
- 1. DIFFERENCES FROM TOPSPEED VERSION 2.00
- 2. GENERAL INFORMATION
- 3. ERRATA
- 4. OBJECT-ORIENTED GRAPHICS INTERFACE
- 5. TOPSPEED EXTENSIONS
- ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
- 1. DIFFERENCES FROM TOPSPEED VERSION 2.00
- ==========================================
- Major improvements and alterations to the TopSpeed Modula-2
- compiler and code generator since the previous version include
- the following:
- þ More memory models are available, including an automatic code
- and data overlaying model.
- þ TopSpeed Modula-2 now supports Microsoft Windows version 3.
- þ Support for third-party libraries has been improved,
- particularly in the area of floating-point code generation
- (via the standard_float pragma). A large model stack-frame
- library is now supplied with TopSpeed Modula-2, which is
- likely to be of use when linking to third party libraries
- compiled for use with other vendors' C compilers.
- þ TopSpeed Modula-2's object-oriented features have been
- enhanced, to support multiple inheritance and linking to C++
- classes. The syntax of class declarations have been changed;
- the supplied utility program NEWCLASS may be used to translate
- object-oriented source code designed for the previous release
- of TopSpeed Modula-2.
- 2. GENERAL INFORMATION
- =======================
- The following Graph Module procedures are not supported under
- OS/2:
- Arc ClearScreen Cube DisplayCursor
- FloodFill GetBkColor GetFillMask GetImage
- GetLineStyle GetTextColor GetTextPosition GetVideoConfig
- ImageSize InitHerc InitGraph OutText
- Pie PutImage Rectangle RemapPalette
- RemapAllPalette SelectPalette SetActivePage SetBkColor
- SetClipRgn SetFillMask SetLineStyle SetTextColor
- SetTextPosition SetTextWindow SetVideoMode SetVisualPage
- Stackfill Wrapon
- 3. ERRATA
- ==========
- Reference manual p 17:
- The FIXREAL Real type should have the following numeric range:
- -2^63 to 2^63 -1
- Reference manual p 18 paragraph 1:
- This paragraph should read as follows:
- Modula-2 has one predefined enumeration type defining
- truth values:
- TYPE
- BOOLEAN = (FALSE, TRUE);
- Reference manual p 43:
- A type transfer function is considered well-behaved if the sizes
- of the transfer type and the value type are the same, or if a
- proper VAL conversion is performed. If the value type size is more
- than the transfer type size then the remaining last bytes of the
- value are ignored. If it is shorter, the last bytes of the resulting
- value are undefined.
- Reference manual p 72:
- Line 18 of Example 1 should read as follows:
- RETURN(c1 IS classTwo)
- Reference manual p 109:
- The default value of separators should read as follows:
- Str.CHARSET {
- CHR(9),
- CHR(10),
- CHR(13),
- CHR(26),
- CHR(32),
- }
- Reference manual p 126:
- The values returned by the GetDrive procedure are
- 1 for Drive A, 2 for Drive B, etc.
- Reference manual p 136 line 29:
- This line should read:
- Name : PathTail;
- Reference manual p 137:
- The example should read as follows:
- (*
- This example also illustrates the use
- of ReadNextEntry
- *)
- IMPORT FIO, IO;
- VAR
- Ent : FIO.DirEntry;
- FOUND : BOOLEAN;
- BEGIN
- ...
- Found := FIO.ReadFirstEntry( "C:\COM\*.EXE",
- FIO.FileAttr{FIO.system,FIO.hidden},
- Ent);
- WHILE Found DO
- IO.WrStr(Ent.Name);
- IO.WrLn;
- Found := FIO.ReadNextEntry(Ent);
- END;
- ...
- Reference manual p 139:
- The drive values for the SetDrive procedure are
- 1 for Drive A, 2 for Drive B, etc.
- Reference manual p 155:
- The syntax for the FindNewPath and FindPath procedures should
- read as follows:
- PROCEDURE FindNewPath(
- name : ARRAY OF CHAR;
- VAR fullname : ARRAY OF CHAR) : BOOLEAN;
- PROCEDURE FindPath(
- name : ARRAY OF CHAR;
- VAR fullname : ARRAY OF CHAR) : BOOLEAN;
- The description of these procedures omits the following information:
- FindNewPath always returns TRUE.
- FindPath returns TRUE if the requested file was found.
- Reference manual p 157:
- The description of the Open procedure should read as follows:
- ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
- Open Open file for reading using redirection
- ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
- PROCEDURE Open( name : ARRAY OF CHAR ) : File;
- The Open procedure is used to open a file for reading. In
- this way it is identical to the OpenRead procedure in the
- FIO module. This version of Open, however, uses the
- redirection file to determine the full path string of the
- file. The FIO version of OpenRead only looks in the current
- directory.
- Reference manual p 157:
- The OpenRW procedure is not documented in the manual. The syntax
- and description are as follows:
- ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
- OpenRW Open file using redirection
- ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
- PROCEDURE OpenRW( name : ARRAY OF CHAR ) : File;
- The OpenRW procedure is used to open a file for processing.
- In this way it is identical to the Open procedure in the FIO
- module. This version of Open, however, uses the redirection
- file to determine the full path string of the file. The FIO
- version of Open only looks in the current directory.
- Reference manual p171:
- The third paragraph should read as follows:
- Thus to draw a rectangle in Red, on a CGA adapter:
- x:= Graph.SetVideoMode(MRES4COLOR);
- y:= Graph.SelectPalette(0);
- (* Palette 0 *)
- Graph.Rectangle(10,10,100,2,FALSE);
- (* The color is 2 (Red) *)
- Reference manual, page 173:
- The description of Arc should be replaced by the following:
- PROCEDURE Arc( x0, y0, a0, b0, x1, y1, x2, y2 : CARDINAL;
- Color : CARDINAL );
- Draws an arc in the color number specified by the Color
- parameter. The arc drawn is a fragment of an ellipse. The
- arc is specified using the parameters (x0,y0), a0, b0,
- (x1,y1) and (x2,y2) in the following manner:
- (x0,y0) Specifies the center of the ellipse that
- contains the arc.
- a0 Specifies the length of the semi-major axis
- of the ellipse that contains the arc.
- b0 Specifies the length of the semi-minor axis
- of the ellipse that contains the arc.
- (x1,y1) Specifies the co-ordinates for the starting
- point of the arc
- (x2,y2) Specifies the co-ordinates for the ending
- point of the arc
- The arc is drawn from (x1,y1) counterclockwise to (x2,y2).
- Reference manual, page 177:
- The description of Ellipse should be replaced by the following:
- PROCEDURE Ellipse( x0, y0 : CARDINAL; a0, b0 : CARDINAL;
- Color : CARDINAL; Fill : BOOLEAN );
- Draws an ellipse in the color number specified by the Color
- parameter. The ellipse is specified using the parameters
- (x0,y0), a0 and b0 in the following manner:
- (x0,y0) Specifies the center of the ellipse.
- a0 Specifies the length of the semi-major axis of
- the ellipse.
- b0 Specifies the length of the semi-minor axis.
- Color Specifies the color number used to draw the
- ellipse
- Fill If TRUE the ellipse is filled with the current
- fill mask (see Graph.SetFillMask).
- Reference manual, page 185:
- The description of Pie should be replaced by the following:
- PROCEDURE Pie( x0, y0, a0, b0, x1, y1, x2, y2 : CARDINAL;
- Color : CARDINAL; Fill : BOOLEAN );
- This procedure draws a pie slice. The parameters have the
- following meaning:
- Draws an arc in the color number specified by the Color
- parameter. The arc drawn is a fragment of an ellipse. The
- arc is specified using the parameters (x0,y0), a0, b0,
- (x1,y1) and (x2,y2) in the following manner:
- (x1,y1) Specifies the center of the ellipse that
- contains pie slice.
- a0 Specifies the length of the semi-major axis of
- the ellipse that contains the pie slice.
- b0 Specifies the length of the semi-minor axis of
- the ellipse that contains the pie slice.
- (x1,y1) Specifies the co-ordinates for the starting
- point of the pie slice (curved) edge.
- (x2,y2) Specifies the co-ordinates for the ending
- point of the pie slice (curved) edge.
- The pie slice arc is drawn from (x1,y1)
- counterclockwise to (x2,y2).
- Color Specifies the color number used to draw the
- slice.
- Fill If TRUE the pie slice is filled, otherwise
- only the outline is drawn.
- Reference manual p 199:
- The SetVideoMode procedure returns FALSE if the mode selected
- is not supported by the hardware.
- Reference manual p 220:
- The example should read as follows:
- For example:
- IMPORT Lib, IO;
- ...
- VAR
- CPU : Lib.CpuRec;
- ...
- Lib.CpuId(CPU);
- IF (CPU.cpu <> Lib.cpu_80386)
- OR (CPU.fpu <> Lib.fpu_80387) THEN
- IO.WrStr(
- "Won't run without a 80386 & 80387");
- HALT;
- END;
- ...
- Reference manual p 229:
- The declarations of the SetDate and SetTime Procedures should
- read as follows:
- PROCEDURE SetDate(
- VAR Year, Month,
- Day : CARDINAL) : BOOLEAN;
- PROCEDURE SetTime(
- Hrs, Mins,
- Secs, Hsecs : CARDINAL) : BOOLEAN;
- The return value indicates whether the date or time specified
- was valid.
- Reference manual, page 257:
- PROCEDURE ATan2 should read:
- ATan2 returns the arc tangent of ( Y / X ) and the result is
- in the range -ã to ã.
- Reference manual p 261 line 24:
- This line should read as follows:
- These are in graphics coordinates irrespective of the mouse
- state.
- Reference manual p 261 line 30:
- This line should read as follows:
- These are in graphics coordinates irrespective of the mouse
- state.
- Reference manual p 275 lines 11 and 15:
- The value in both cases should be 1 and not 0.
- Reference manual p 286:
- The spelling of the NearAllocate and FarAllocate procedures
- is incorrect and should read as spelt in this sentence.
- Reference manual p 288:
- The spelling of the NearDeallocate and FarDeallocate procedures
- is incorrect and should read as spelt in this sentence.
- Reference manual, page 312:
- Str.Match matches insensitive to the case of the characters.
- Thus the second example returns TRUE.
- 4. OBJECT-ORIENTED GRAPHICS INTERFACE
- ======================================
- Within the multi-language example programs is an object
- orientated interface to the M2 graphics module.
- 5. TOPSPEED EXTENSIONS
- =======================
- The following is a list of TopSpeed extensions to Modula-2 as
- described in Niklaus Wirth's Programming in Modula-2, 3rd
- edition.
- Address constructor A := [S:O PT]
- Based pointers SP : POINTER S TO T
- Structured constants SC = A(C1,C2)
- Concatenation of string constants S = 'ST'+'RING'+CHR(13)
- Type conversion of numeric types I := INTEGER(CARD)
- Standard types BYTE, SHORTINT, SHORTCARD, LONGCARD,
- LONGWORD, SHORTADDR
- Standard constant NULLPROC
- Object extensions, with CLASS, IS, VIRTUAL and SELF keywords.
- Alias notation A ::= P
- Compiler pragmas (*# ... *)
- Conditional compilation (*% ... *)
- Compiler directives (old style) (*$ ... *)
- SIZE and some other SYSTEM functions do not
- have to be imported from SYSTEM
- Function procedures may return any data type
- Shift operators >> and <<
- GOTO/LABEL GOTO fail
- SIZE may be applied to any expression or designated variable.
- Identifiers imported in a definition module do not have to
- be re-imported in the corresponding implementation module.
- A module may refer to its own objects using qualified
- reference.
- Keyword INLINE allows specification of a procedure body
- in a definition file.
- Binary procedures can be defined to be a constant agregate.
- VSIZE can find the size of a record (or object) type or
- variable upto and including the specified field.
- FieldOfs returns the offset of a field relative to the
- start of a record (or object) variable or type.
- A New function FieldOfs can be used to get the offsets of record
- fields of record and objects, it works on variables and types.
- Function procedure results may be dereferenced,
- indexed or fields selected.
- Procedures may be declared using a FORWARD declaration.
- Procedure may be declared externally in another module
- PROCEDURE P; IN file;
- Multiple-models mean that ADDRESSes and POINTERS can be 16 or
- 32 bits. FarADDRESS, NearADDRESS, FarADR and NearADR can
- be used to specify these explicitly.
- Procedure variables may be compared for equality.
- Pragmas may specify various calling conventions/parameter
- passing techniques.
- Record fields may be packed by using a pragma.
|