What's new in FORCE 2.4 ? ========================= This document describes the current status of enhancements of FORCE which have been developed by KRS compared to the original US version 2.1E. This document was written by German KRS engineers, so the English may not be perfect. You never can say that a given piece of software is free of bugs. This is also true for FORCE. So one major part of our work on the FORCE code was focused on fixing known bugs - hopefully, we killed a lot of them. We want to say THANK YOU to many of our customers who gave us valuable information about bugs. In addition, we also want to say THANK YOU to the customers who gave us a lot of new ideas for enhancements. Many of them have been realized in this version. General ======= Messages All system messages (including run-time error messages have been translated into German language). Compiler messages have been translated into German language as well. Internal structures make it easy to translate the package into other foreign languages. English is the default message value in FORCE 2.4, German is the default in FCO 2.4. Commands ======== SET SCOREBOARD This SET is OFF by default - this is contrary to other Xbase products, but it is more practical because most programmers set the scoreboard off anyway. The SCOREBOARD now also displays the status of the Scroll Lock key. The color attribute for the scoreboard indicators can now be defined separately (see __color_score, and SetColor()). It is now possible to individually suppress certain status indicators and the screen position of each of the status indicators can be defined separately (see Set_???_Pos()). MENU TO MENU TO now supports German Umlauts as choice letters. While in a MENU TO, timer interrupt routines will continue working now. @...GET The formatting function "@K" will now be supported, i.e. the contents of a GET field will be deleted if the user types in any other character but the cursor right key as the first entry into a field to move the cursor to a specific position in the field. @...SAY The clause "!", and the functions "@!" and "@A" in SAY/GET ... PICTURE now support German Umlauts, and other available extended international characters.. The clauses "@C", and "@X" - instead of the hard-coded trailing messages "CR", and "DB" following numeric values, it is now possible to define the messages using the function SetDbCrString(). SET EXACT SET EXACT is now OFF by default - this is compatible to other popular Xbase products. ??? This new output command works similar to the ? command, the only difference is that ??? will output the carriage-linefeed after outputting the parameters, where the ? command first outputs the CR/LF before the parameters. OPEN/USE READONLY This new option allows opening databases in a read-only mode, similar to Clipper 5. New and Enhanced Library Functions and Procedures ================================================= Bit Functions: ------------- SetBit() TestBit() ResetBit() MaskBit() And() Or() Xor() Date ---- DDow() Function similar to dow(), but returning the day numbers according to German standards, i.e. Monday = day #1, ..., Sunday = day #7. Database, Files --------------- A_Dbf() Function, equivalent to Dbf(), but expecting an alias as a parameter. Browse() Function similar to Clipper's dbedit() including mouse support, and other extended features, including the possibility to display derived columns. CreateTempFilename() Function to create a unique name for temporary files. Fldcnt(), A_Fldcnt() Functions to return the number of fields in a database. Ind_Order(), A_Ind_Order() Functions to return the current status of index order (SET ORDER TO) in the current, or in the specified alias. Low-level file I/O ------------------ Low-level file I/O routines now support buffered I/O. LAN Support ----------- Network functions are now compatible to Clipper 5.01, and earlier versions. A LOT of bugs have been fixed. Math ---- Dbl_Power() Function returns the power of a number in dbl format. Factorial() Function returns the factorial of a number. Mouse Support ------------- Various routines to support the mouse driver have been added: MouseAnyButtonPressed() MouseButtonCheck() MouseButtonPressed() MouseButtonPressedRow() MouseButtonPressedCol() MouseButtonReleasedRow() MouseButtonReleasedCol() MouseButtonValue() MouseButtonWait() MouseButtonWaitPressed() MouseButtonWaitReleased() MouseDefineArea() MouseInArea() MouseActRow() MouseActCol() MouseSetCol() MouseSetRow() MouseSetRowCol() MouseSaveState() MouseRestoreState() MouseCheck() MouseOn() MouseOff() IsMouseOn() MouseButtons() MouseCursorType() Printer Support --------------- nPready() Function tests if a printer connected to a given printer port is ready. PrStatus() Function returns the status information of a printer connected to a given printer port. Screen Support -------------- All screen driver routines now use the screen size currently defined instead of using the hard-coded 25 * 80 (this is still the default). All screen output may now be fully redirected through BIOS instead of using direct screen writes. This allows the creation of applications for non-compatible machines ("only" BIOS compatible). ScrnDriver() Function returns an identifier indicating the currently active screen driver mode. Scroll(), Scroll_1(), ScrollFill() Functions to scroll a certain screen area up or down by a specified number of rows (Scroll()), or by one row (Scroll_1()). ScrollFill() fills the free row after the scroll with given characters. Is_Cursor() Function to return current status of the cursor (on/off). ScrSeg() Function returns the segment address of the active video adapter. SetBlink() Function to select between highlight, and blinking attributes on EGA, and VGA adapters. The function returns the mode which was previously active. SetCapsPos(), SetInsPos(), SetNumPos(), SetScrollPos() Procedures to define the screen positions for the various SCOREBOARD status indicators. These procedures also allow to totally hide any of the status indicators. SetColor Procedure similar to the SET COLOR TO command. In addition it accepts a parameter for the screen attribute of the status indicators (see SET SCOREBOARD). Swap_Colors Procedure to exchange the attributes __color_std, and __color_enhcd. VideoType Function returns the type of the currently active video adapter. Box --- Procedure to draw boxes, similar to Clipper's BOX command. GetMaxRow(), GetMaxCol() Functions return the maximum numbers for row and column, allowed in the currently defined screen size (24, and 79 by default). SetMaxRowCol() Function defines a specified screen size (note - this does not change the current mode of the display adapter - this needs to be set separately - it only defines the logical screen size for FORCE's screen driver routines). ZoomBox() Procedure to "zoom" open a box on the screen. The border characters, the fill character, attributes for the border, and the fill area, and a shadow can be defined separately. Another parameter is used to control the "zoom" speed. The zoom speed is almost independent from the current CPU speed. Functions for direct screen memory access ----------------------------------------- PutScreenWord GetScreenWord() PutScreenChar GetScreenChar() PutScreenAttr GetScreenAttr() __color_score System variable which contains the current attribute for the display of scoreboard indicators. __max_row, __max_col System variables which contain the current number of maximum rows, or maximum columns supported by the screen driver routines. SET Switches ------------ The following functions return the current status of the associated SET flag, and they assign a new value to the flag. GetSetAlternate() GetSetBell() GetSetCentury() GetSetConsole() GetSetConfirm() GetSetDate() GetSetDecimals() GetSetDeleted() GetSetDelim() GetSetDevPrt() GetSetExact() GetSetExclusive() GetSetFixed() GetSetIntensity() GetSetMargin() GetSetMessage() GetSetPrint() GetSetScoreboard() GetSetStatus() The following functions return the current status of the associated SET flag. GetAlternate() GetBell() GetCentury() GetConsole() GetConfirm() GetDate() GetDecimals() GetDeleted() GetDelim() GetDevPrt() GetExact() GetExclusive() GetFixed() GetIntensity() GetMargin() GetMessage() GetPrint() GetScoreboard() GetStatus() The following procedures assign a new value to the associated SET flag: SetAlternate() SetBell() SetCentury() SetConsole() SetConfirm() SetDate() SetDecimals() SetDeleted() SetDelim() SetDevPrt() SetExact() SetExclusive() SetFixed() SetIntensity() SetMargin() SetMessage() SetPrint() SetScoreboard() SetStatus() Special features ---------------- __lib_lang System variable which contains an information about the language of the nation-specific modules in the Library, e.g. "English", "French", "German", etc. FORCE_Start If one of these procedures is defined in an application (only one of them may be defined in each one program), they will be called at start-up immediately before execution of FORCE_main, or force_main. This allows for standard initializations, like activating interrupts, etc. FORCE_End If one of these procedures is defined in an application (only one of them may be defined in each one program), they will be called immediately before execution of the final exit code of the application. This allows for standard de-initializations, like d -activating interrupts, etc. _$set_FCO, _$Is_FCO() These are internal functions, included to control, and test a specific flag which can be used by 3rd-party libraries to determine if they are linked with FORCE.LIB, or with the original FORCE.LIB (which uses a different way to access certain screen drive routines). On demand, 3rd-party developers will get the necessary information free of charge. String ------ CnvUmlt() Function to convert German umlauts into expanded equivalents to allow indexing based upon German DIN standards. Duden() Function to convert German umlauts in a string into the "plain" equivalents. This function allows indexing according to popular German dictionary standards. Isempty() Function to test if a character string is "really" empty, i.e. if it has a length of 0. Normalize() Function to convert a string into "normalized" format, according to the following rules: - remove all non-letters, and all non-figures - convert all characters to lower case - convert international extended characters to their "regular" equivalents, or to character pairs The resulting string will be truncated, or padded with blanks to make its length equal to the source string. This function is useful for creating indexes on name fields, etc. System ------ Addr() Function returns the full address of a given object in memory. CpuSpeed() Function returns a relative value indicating the current CPU speed. DefineJump(), DoJump() Routines to allow jumps to a specific point in a program. Indirect function calls ----------------------- FunctionAddress() returns the address of a function IndCall calls a function, specified by its address indirectly, and passes parameters to the function. Interrupt(), Int_W_Flags() Routines to call system interrupts. IsDir() Function to test if a given directory exists. LookForFile() Function, similar to exist(), but searching the file in the current directory, and in the directories specified in the PATH environment variable in DOS. OffsetValue() Function returns the offset address of its parameter. Peek(), Poke() Routines to directly read, or write to addresses in system memory. PortInB(), PortInW(), PortOutB, PortOutW Routines to read, or write bytes or words from, or to system I/O ports. SegmentValue() Function returns the segment address of its parameter. SetNumFormat Procedure to control the formatting of all numeric I/O in an FORCE application. By default, the dot "." is used as the decimal stop, and the comma "," is used the triplet separator. As an option, now the comma "," may be used as the decimal stop, and the dot "." acts as the triplet separator. When the "European mode" is on (decimal comma), all numeric output will be formatted according to this format. The output of the str() function will also be formatted according to the current setting of the numerical format, whereas the val() function always accepts both characters ",", or "." as the decimal stop. When entering numeric values via the keyboard, the ",", or the "." may be used as decimal stops, no matter what the current numerical format has been set to. Ticks Procedure to delay the program execution by a specified count of timer ticks (18.2 ms). Enhancements to the FORCE Compiler ================================== Default Library Name Generated OBJ modules now contain an entry for the default library (i.e. FORCE.LIB). With most linkers, it is no longer required to specify the FORCE library, e.g., instead calling MS-Link using LINK foofoo,,,force; now LINK foofoo; will be sufficient. Dynamic Symbol Table The management of the compiler-internal symbol table has been totally rewritten which allows the compiler to make use of the total free DOS memory for the symbol table. Previous versions have been limited to a maximum size of 64K which sometimes caused problems when large program files were compiled. Length of a Logical Program Line The maximum lenght of logical program line (a program line plus following lines if previous line ends with ';') has been increased from 1024 to 2048 characters. Language enhancements --------------------- ??? New output command, similar to '?'. Different to '?', '???' outputs CR/LF after outputting the Expressions, where '?' outputs CR/LF before the Expressions. END New keyword, which may be used instead of ENDDEF, or ENDPRO. ENDFUNC New keyword which may be used as an alternative to end a function definition. FUNC New keyword to be used as an abbreviation for FUNCTION. PROC New keyword to be used as an abbreviation for PROCEDURE. PROTO New keyword to be used as an abbreviation for PROTOTYPE. PARA New keyword to be used as an abbreviation for PARAMETERS. #output New compiler directive to output a message to the screen while compiling - this is handy to indicate the execution of conditional compiles, e.g.: #ifdef GERMAN #output Compiling German version . . #else #output Compiling Kisuaheli version . . #endif #pragma stack Allows to control activation, or deactivation of stack checking in a program (similar to the command line switch /n). #pragma range Allows to control activation, or deactivation of array range checking in a program (similar to the command line switch /r). "Structure Characters" ---------------------- Special leading graphics characters in a program line are now treated as white spaces, which allows the following: DO WHILE DO_IT IF a > b ? "FooFoo" ELSE ? "BlaBla" ENDIF ENDDO In addition the form feed character (chr(12)) will also be treated as white space if it is leading a program line, allowing for forced form feeds in printed program listings. - END of FCO24.TXT -