New for KCML 5.02:


  • Forms enhancements:
  • Forms editor:
  • General client issues:
  • bkstat:
  • Editor:
  • Network Licence server:
  • Licence file:
  • Oracle:
  • KISAM:
  • ODBC:
  • Error logging:
  • TCP/IP sockets:
  • Installation:
  • Help:
  • SHELL and child processes under NT:
  • Service Manager:
  • Memory manager:
  • EuroCurrency:
  • $DECLARE and OLE:
  • Preserving variable capitalization:
  • General:
  • Misc Bug fixes:

  • Forms enhancements:

    Added support for dynamic creation of controls. There is a new form event, called Create. This is called before the Enter event. The event handler code is restricted in what it can do, but the most important element is the availability of a Duplicate method available for most controls. The simplest form takes new Left and Top co-ordinates, a second form also requires a new title. Both duplicate the given control including all properties defined using the forms editor and return a value that may be used in the same way as the & operator on an existing control. There is an additional property, called template, which if set means that the control itself does not appear in the form, but just its duplicates. In effect the Create event allows the programmer to do programmatically what may be done visually in the forms editor. The Duplicate method is only available within the Create event, and is the only method permitted in the Create event. There are several duplicate methods, some general and some specific

    newsym = .anycontrol.duplicate(newx, newy)
    newsym = .anycontrol.duplicate(newx, newy, newtext$)

    In the following, a control is duplicated and plcaed on a different tab page on the same tab. This coould be a previously created dynamic tab page

    newsym = .anycontrol.duplicate(newx, newy, newtabpage)
    newysm =.tabbed1.tab1.duplicate(newtext$)
    newysm = menu1.fileitem1.duplicate(newtext$)

    The following has an extra flag to indicate whether the new item should be at the end of the list the original item is in, or a child menu item of that original item.

    newysm = menu1.fileitem1.duplicate(ischild)

    The following also duplicates a menu item, but this time the new item is a menu separator

    newysm = menu1.fileitem1.duplicate()

    On the fly creation of controls this way once the form is displayed is not permissible. Can now duplicate tab items and menu items, and duplicate tab controls onto different tab pages on the same tab control.

    Added support for typed parameters in OCX methods. Needed an enhancement to the DEFFORM for OCX methods to include per parameter type. Also send and receive this type iformation and cope with paremeters that are pointer to something where we receive a result. Also introduced buffering so that events are delayed until the method is fully processed.

    Calling an OCX method and assigning the result will now force a flush and to wait for the result value to be returned.

    Added support for returning results from OCX methods and also returning selected OCX properties whilst we are at it. Invoked with new RETURN grammar viz:

    a = .kcmlocx1.methodcall(a, b, RETURN .thisproperty, RETURN .returnprop2$)

    This does not support methods returning strings. Users should be careful as it needs a blocking $DECLARE which results in a ping-pong to retrieve the information which may have perforamance implications.

    Numerous enhancements to grids. Now support grammar like

    .kcmlgrid.cell(X,Y).text$="kljl"

    In terms of enhancing the look, pictures are now allowed in grid cells, together with an alignment property to say how they should be placed. There is also a new Join line style. This joins the current cell with either the cell to the left or above or both, allowing for titles that span more than one column in a tidier fashion. A title may be centred across several columns as well. Several minor display anomalies have also been tidied up. A new selection type for mouse clicks, called None, has been added. This allows the user to click on a cell and leave it in an un-selected state very much like clicking on a push button.

    Editing of grids was initially designed to meet the case of editing a grid row corresponding to a row in a database. Further code was added to make this more general, although not particularly easy for the programmer. There is now an EditGrid method to complement EditCell and EditRow and it is hoped that this will make editing of non-database data much easier. If you are validating, CursorRow and CursorCol tell you what you are validating, but now there is also NewRow and NewCol that says where it will go if you return TRUE to validate (this value will be -1 if moving off the control). Also storage of text is now done at the server end as well, although there will probably be a design time property to sepecify this behaviour one day.

    The syntax has been enhanced to make program code neater (form1.grid1.cell(x, y).text$ is now permissible, both to set and read the text on a cell).

    Added drop down support to dbedits on grids.

    Added server side storage of text for grids allowing the .text$ property to be read in all cases.

    Add property allowing dbedit drop down lists to sorted rather than being in insert order.

    JPEG support added for bitmap picture buttons. A JPEG image will generally be smaller than a bitmap. In addition it is possible to embed (usually small) pictures within the DEFFORM statement itself (HEX() is supported as well as normal strings in literal property assignments).

    Much improved palette handling to support forms with many multi-color bitmaps or JPEGS on 256 and 16 bit colour displays.

    Added rich edit text box support complete with toolbar and printer support allowing wordpad style text editing on a form. Further properties and methods including several new print options for rich edit controls so that kcml can get feedback on the result of print operations.

    This was partially implemented in 5.01 because of obligations in a Kerridge application, but was not considered complete and was not documented. The control allows a simple-word processor to be embedded on a form. It includes basic editing controls - bold, underline, ital, left / centre / right justified and font selection. There is a method for mail merge as well. It is suitable for designing and printing standard letters, mail merge letters etc. whilst retaining full control over file saving and retrieval at the server end.

    For 5.02 a few additional properties and events have been defined. A PrintStatus event is called after a PrintOpen or Print method is invoked indicating the status of that operation in a PrintStatus property (0 = PrintOpen success, 1 = PrintOpen fail (or cancel), 2 = Print success, 3 = Print fail). Nothing is sent until the PrintClose so that several mail merge letters can, for instance, be printed as one document. A Modified event and property allow for easy operation of a Save / Save As... button. The Save button is enabled when the modified property is TRUE. The event is triggered when the text is edited and the modified property changes value. The event is not triggered if the modified property is changed programatically, so you should disable the save button and reset the modified property after a save for instance.

    All new internal tab control with tooltips replacing external DLL product froma third party. Creates single page tabs with Microsoft style ears. If tab text overruns the edge of control, captions are truncated and tooltipped with the full text. Pass focus to the first control on a tab page when selected. Fixed a problem where design time tab properties weren't preserved.

    Support for deferred data aware updates on tab pages by only doing data awareness for tab pages that are currently visible.

    Most dialog controls are tooltipped with their help text. Exceptions being tabs and grids with are tooltipped with the full text of captions/cells if truncated. Dbedits are tooltipped with help text unless their contents are truncated in which case they show the full text.

    New generic propery, TabVisible, to indicate whether a control is on an active tab page or not.

    REF2245: Bring up execute window before WINDOW OPEN if nothing else has been printed.

    REF2446: When moving controls in a tab take account of tab ears & border otherwise they end up in the wrong place.

    REF2396: Enhancement implemented. It is now possible to change the text on a tab of a tab control at run-time.

    REF2430: Up and down keys on a date now set the modified flag

    Forms editor:

    Added rich edit support to the form editor.

    Fixed a bug when spacing controls evenly. The code has been rewritten to be less complicated. Ref bug 2386.

    The option to add extra space to static controls when sizing to content is now defaulted to off. Ref bug 2387.

    The "Tidy controls" option now aligns static controls with their corresponding edit controls correctly. I have also added a toolbar button for this option to the Alignment toolbar. Ref bug 2394.

    Fixed a bug when naming subcontrols (tabs, status bar panes, etc.). I had assumed that a sub-control name only had to be unique within the namespace of its parent. This has been changed so they are always unique. Ref bug 2404.

    Added sexy new button menus.

    General client issues:

    When socket link is abruptly broken by a network outage (which is not the same as closed at host end), we now alert the user of the fact before going away. Normal host disconnects go away without warning as usual.

    Restored KCMLDisplayImage() internal $DECLARE function (but without Fractal support).

    Build Help menu by enumerating registry keys under HKEY_LOCAL_MACHINE/Software/Kerridge/Help rather than hard wired names. Allows users to add their own context sensitive help files for subroutine lookup for example by defining an Apps string under this key.

    On Win95 the displaying of icons in start menus was not always correct. Now support both big and small icons. New editor icon.

    Added options for help/truncated text tooltips on forms.

    The RESET key was not being sent on Win95 as the key sequence from KCML4 is not available. It now uses alt-ctrl-break.

    In editor Copy & Paste toolbar buttons send Ctrl-C & Ctrl-V and thus have the same functionality. Mark mode is disabled.

    When we show the main window set its Z order so it appears on top of the splash window. Should stop intermitent order problems on Win95 & very very occasionally NT.

    We don't wait for a keypress at the end of programs anymore, so we don't need to put out an extra character after Ok & Cancel buttons. This fixes the problem of not being able to break in to a form when an OK or Cancel button has focus.

    Dialog for setting text mode colors now uses correct TT fornt.

    KCLIENT has support for internationalization on multiple code pages.

    REF2418: It was sometimes possible to lose the cursor from the text window. Fixed by tracking cursor status per window rather than on a global basis.

    REF2447: When we've decided we are connected don't give up if we see the word login: again i.e. if a text application telnets to another system and enters its password incorrectly.

    REF2468: Screen dump didn't take account of scrolling.

    BUGFIX: The datascope was missing the last few bytes from a printed output. The client will not now close down if the datascope is displayed allowing closedown sequences to be captured and displayed. Closing the datascope window will allow the client to terminate.

    General client issues:

    When socket link is abruptly broken by a network outage (which is not the same as closed at host end), we now alert the user of the fact before going away. Normal host disconnects go away without warning as usual.

    Restored KCMLDisplayImage() internal $DECLARE function (but without Fractal support).

    Build Help menu by enumerating registry keys under HKEY_LOCAL_MACHINE/Software/Kerridge/Help rather than hard wired names. Allows users to add their own context sensitive help files for subroutine lookup for example.

    On Win95 the displaying of icons in start menus was not always correct. Now support both big and small icons. New editor icon.

    Added options for help/truncated text tooltips on forms.

    BUGFIX: The datascope was missing the last few bytes from a printed output.

    REF 2418: It was sometimes possible to lose the cursor from the text window. Fixed by tracking cursor status per window rather than on a global basis.

    The RESET key was not being sent on Win95 as the key sequence from KCML4 is not available. It now uses alt-ctrl-break.

    In editor Copy & Paste toolbar buttons send Ctrl-C & Ctrl-V and thus have the same functionality. Mark mode is disabled.

    When we show the main window set its Z order so it appears on top of the splash window. Should stop intermitent order problems on Win95 & very very occasionally NT.

    KCLIENT has support for internationalization on multiple code pages.

    REF2447: When we've decided we are connected don't give up if we see the word login: again i.e. if a text application telnets to another system and enters its password incorrectly.

    We don't wait for a keypress at the end of programs anymore, so we don't need to put out an extra character after Ok & Cancel buttons. This fixes the problem of not being able to break in to a form when an OK or Cancel button has focus.

    bkstat:

    You can use bkstat -v to test if the KCML in installation dir is running.

    bkstat -p and -t options no longer leave terminal in raw mode.

    Under Unix display TERMFILE inode column in bkstat output. Added -L option to print out inode numbers.

    Support for displaying counts data pages actually allocated with the -P option.

    Supports interactive use. Displays IPADDR field in alternate mode. Displays the user msg in the memory page list (-P).

    Editor:

    The editor will no longer put out "END PROGRAM, press RETURN etc" on the execute window and will just go back to the editor

    A programatic $END does the same as an END rather than quit kcml if the editor is up, unless in a $released child.

    A PANIC encountered in a running program will also return control to the editor if it is active rather than dumping program state and terminating. If you do wish to get the dump then switch to the console window and type PANIC.

    No longer list a complete DEFFORM in a LIST RETURN as there could be pages of the stuff.

    Fixed odd little bug recently introduced whereby the editor debug output sometimes appeared shifted left by 1 char.

    REF2471: Searching for syntax errors was not finding syntax error on first operator due to some rather odd coding introduced when searching for CVS operators.

    Network Licence server:

    Changes for the WKCML LAN protected by a licence server only. Now default the termfile to be termfile.txt in that directory and not use the registry. Also partition numbers are determined using the protection scheme information and not just the local PSTAT so that partition numbers are unique across the system. The locking scheme is network transport independent and will work on Novell SPX or anybody's NETBIOS.

    Modified the licence server program to use a separate thread for the tray distinct from other window handing code. This fixes patchy behaviour on Windows 95, where often the licence server would not respond as it was busy doing other things. Also return explicit error code to kcml is cannot find / read the dongle.

    If dongle is not the correct dongle on dk2 licence server, then print the dongle number expected.

    Added exception handler code to the licence server.

    Licence file:

    Renamed gethostid utility as kgethostid. This is used to return the licence key for a system.

    New service for NT kcml only to retrieve the hardware key when that cannot be done by KCML itself (because it does not have administrator privledges).

    Oracle:

    Fixed ORACLE problems with KI_START, KI_READ with leading blanks in keys. Made KI_START and KI_READ generate explicit blank literals for key segments that are blank as Oracle will not compare blank VARCHAR2 if bound. Note that this requires KI_TYPE_CHAR columns to be declared NOT NULL.

    Bind blank columns CHAR(1) during INSERT or Oracle will consider the column to be NULL and it will fail the NOT NULL constraint.

    Fixed problem with packing 4 byte integers greater than 0x7FFFFFFF. Removed explicit Julian date code in favour of calling standard KCML ones.

    REF2280: Julian date conversion algorithm now handles leap years in 1900 and 2100 properly. This does not affect dates between 1900 and 2100.

    Use special date to flag a NULL Julian date. Report errors in transaction functions. Map year in out of range Oracle dates to year 9999.

    Fix date corresponding to FFFFFF as 9999-12-31. Null terminate error msgs in KI_ERROR_TEXT

    Allow reuse of random cursor structures so that multiple locks in a table as part of a transaction work.

    Add new KI_BIND_COL and KI_DESCRIBE_COL to make direct execution of SQL for Oracle and ODBC more usable. KI_BIND_COL allows a column in a result set to be associated with a KCML variable such that the variable will be updated with the column when KI_FETCH is executed.

    CALL KI_BIND_COL handle, col, SYM(buf$) TO status

    KI_DESCRIBE_COL will return info on a column from a prepared SQL result set. Columns count from 1. The type info in type$ is an SQL type like "VARCHAR(10)". The pack$ arg has the $FORMAT field. The offset can be used with the pack$ string to define a FLD()

    CALL KI_DESCRIBE_COL handle, col TO name$, type$, pack$, offset, status

    KISAM:

    Add new KI_LOCKALL to lock all the rows in a table.

    Don't allow writing outside defined file size with KI_WRITE_PTR

    Allow alternate KISAM logging device through KILOGKEY environment variable. This allows a some users on a machine to use journalling while other users do not. Useful for testing and benchmarking.

    Support for 64 bit file offsets on Unix versions that support the lseek64 API thus allowing files greater than 2Gb on a 32 bit Unix. Currently only available on HP-UX 10.20 and above. This support has always been available on the DEC Alpha which is a native 64 bit Unix.

    Fixed a bug that only affects object kisam type data aware where there are strings with newlines in them . We translate them to 0x0A in KCML, but do not expand them on the way back. Probably broken when this stuff was revised for rev7 type data aware.

    ADD KI routines for Word Search

    Added KI_BU_CREATE to go with KI_BU_OPEN, KI_BU_READ and KI_BU_WRITE. These allow journalled access to flat files.

    Include KI_CREATE, KI_EXTEND, KI_DROP_TABLE KI_MOVE_TABLE and KI_COPY_TABLE in transaction log rather than erroring. These operations will now be performed on recovery after a crash.

    KISAM transaction logging will now work without journaling turned on. Fixed some bugs to do with database objects and 64bit file offsets. Changed transactions to work by connection, or globally.

    KI_OPEN, KI_CLOSE and KI_INIT now work with KISAM LOGGING. Huge log file supported with krecover -n flag. Failure to write to log file now causes KISAM to syslog() and continue to operate. KI_REBUILD and KI_INIT now performed by krecover. Krecover -t now follows log file.

    KCML now re-checks logging status at KI_ALLOC_HANDLE, KI_CONNECT and KI_OPEN.

    Added krecover -D option that removes logging shared memory.

    Some utilities were not logging. - Fixed.

    KSE data dictionary now supports OCCURS.

    KISAM used a partition bitmap to record who had the file open in 'W'rite mode. This was used by KI_OPEN to disallow 'X' access. This partition bitmap has been replaced with a Wlock user count. Added KI_SET_WLOCK_COUNT to (re)set Wlock user count. This removes the 1280 user limit on KISAM, however KI_LOCK_OWNER can no longer tell who has the file open in 'W'rite mode.

    KI_EXTEND was giving KE_ACCESS when it filled a filesystem, it now gives KE_IOERROR

    kisamlib.src stub library updated to include new CALLs

    Now expose data high water mark in byte 84,4 of KI_INFO

    KI_INFO was not filling in the 4 bytes for KISAM error major and minor numbers, the last errno value and the state of the handle/connection. (-ve values of handle indicate database connections) KI_INFO handle uses bytes 66 for 4. KI_INFO connection uses bytes 129 for 4.
    State is a bit field containing the following,
    0x00 unused
    0x01 nothing open now
    0x02 open/connected
    0x04 SQL prepared
    0x08 result set exists
    0x10 flat file open
    0x20 BU file open

    KI_ERROR_TEXT now also returns error text correctly. (again, -ve values of handle indicate database connections)

    ODBC:

    CHAR dynamic parameters that were longer than the server asked for could cause the server to dump.

    Added support for Rev8 new 8 character user names in permissions file using a flag defaulted to off. This can be set on the kiodbc command line with the -8 switch.

    Fix for issue where duplicate column names could cause problems in some types of join

    Literal date and time now supported again. Optional ';' terminator for SQL statements

    Use default of C:\Kerridge\KCML instead of KSERVER and use KCML registry key instead of kservadm's in the server installation script. Added Help button which displays client\drkisam.hlp help file.

    Collected various client option dialogs onto a single tabbed dialog. Printer options are now simpler with only one type of printer instead of workgroups/direct etc. Greyscale screendump works on non-page printers.

    New install script to install single tier kisam odbc.

    Chevroned International strings in CREATE TABLE SQL statements did not correctly handle trailing commas

    Add ability to set ODBC statement options (e.g. execution timeouts) from the client.

    Support execution timeout set either on the command line with a -e switch or via a statement option set by the client. Made default idle timeout zero to disable it unless explicitly set with -t. If the execution timer expires then the server is killed.

    Added display of the current version number to SQL engine with sql -v

    LEFT OUTER JOIN with selection could cause problems in the optimizer

    Added '.' to list of characters that force strings to be quoted by kconvdd

    Selection of integer key field that was not 4 bytes could fail to start properly

    Added support to create the Rev8 ODBC_RW file (sql -q)

    Added support for OCCURS in KSE dictionary.

    SQL_tables could return EOF error if last packet was empty, resulting in a 'General ODBC error'

    REF 1619: ascii sources file insisted on perms or comment. - Fixed.

    Error logging:

    Log all abnormal terminations in syslog on Unix and the Event Log on NT. Events under win95 are logged to a text file managed by the KCML Service Manager.

    Add new WRITE LOG [level,] msg$ statement to allow logging to event log by applications.

    New minimum threshold for event logging in byte 52 of $OPTIONS RUN Defaults to zero for all i.e. levels 1, 2 and 3 Drop unused exit codes and panic strings. Reword exit code text to be more explanatory.

    Set byte 9 of $OPTIONS RUN to 1 for all platforms to force panic on core dump. No longer generating panics if we can go to editor. Log panics and errors during panic to the syslog before we start the dump. Exit codes are more specific and give a useful message in a message box on client before the client terminates. Panic files always hace a .TXT extension.

    TCP/IP sockets:

    Make sure we have a directory allocated after an OPEN# for a socket as this will be displayed by LIST DT. Correctly error SIGPIPE signal sent when we write to a socket the client has closed.

    Server sockets were not getting the right FD flags to work correctly on NT. Also now re-suse closed sockets with SO_REUSEADDR socket option allowing a server to be quickly restarted after a crash. Supports text flag.

    Installation:

    Up to date help file covering licence files, Unix upgrades, WKCML, dongle servers etc. viz kcmlinst.hlp

    FTP installer can now run an extra command after installing, eg to get host ID, and can install a licence file with a -l option. Now that we can upgrade a KCML on a Unix host, print "Upgraded successfully" if a licence file was found. For remote Unix install we can now upgrade and install a licence file as well.

    Help:

    Invoke web browser via direct WinExec() if ShellExecute() failes. Program launched is the program registered to open a .html file. This supports early Netscape and other non IE browsers.

    Only scan $HELP test looking for dots indicating the presence of an ext because we might find them in the IP address. Always add .html ext if none found. This can be overridden with $HELPEXTENSION. Ensure .html ext even if called from a text application

    Restore functioning of $HELP($HELP) when using a browser. Previously the .html extension was not being added.

    SHELL and child processes under NT:

    NT SHELL() function no longer errors with X79 if it cannot run a process. Instead it returns the errno as a negative number. If it succeeded then it returns the return code of the process in the MSB byte of a short with the LSB byte zero in the Unix style.

    Now possible to run interactive console child process on NT including intrinsic DOS commands. This is not well supported for Win95 as the child terminates leaving the pipes behind but it does allow the NT command processor to be run from ! or SHELL Fixed problem where B2C hung. To run this on NT you must have a B2C of version 4.10 or later.

    Environment variables are handled the same as in Unix. You can set internal KCML environment variables using the ENV() function.

    The GNU utilities are now shipped on the server CD.

    Service Manager:

    Use the same Kerridge Service Manager program (aka kservadm) for both NT & Win95. Under 95 it starts a service when the shell starts and the users logs in by using a special registry key mimicing an NT service. Such a process will not be terminated when a user logs out. Under Win95 only direct services (such as KCML daemons and libraries) can be managed (i.e. no listening services).

    The service manager now has a Kill All option on a button and also via the command line allowing all KCML processes to be terminated before a backup or upgrade. This is similar to superkill on Unix.

    The NT service manager sets the TCP/IP keepalive feature by default for listening connections. This will allow the TCP/IP subsystem to terminate disconnected processes blocked waiting for client input after the keepalive timeout has expired. This is normally 2 hours but can be changed via a registry setting. Such disconnected processes are only a problem if the network connection has been abruptly broken by a client O/S crashing (or being turned off) or a router failing. Generally the client O/S will tidy up the connection after an application failure.

    When run as a service, KCML sets the running flag as soon as program execution starts. If run with the -g switch then the flag will only be set when a $BREAK! is executed.

    Uses internationalised dialogs.

    Events under win95 (both internal and those from WRITE LOG) are logged to a text file. The Event button becomes the Error Log button & enables control & viewing of these error log file.

    A memory leak has been plugged.

    Memory manager:

    Major revision of KCML heap. Small and large elements are now tracked better so that when small and large blocks become completely empty the are released back to the free heap. Small, large and huge blocks now shifted in memory on $SPACE or LOAD allowing even more unused blocks to be released back to the O/S. Allocations are tracked and divided into around 20 separate functional areas. LIST SPACE should now be able to account for all memory. Added a new LIST SPACE n function, where n provides certain extra information (depending on type of build). This should provide useful diagnostics about where memory is going.

    Defer allocation of space for arrays and strings until first reference as in most Rev8 programs many of the declared variables are never used. LIST DIM will now show how bad this is. Fixed a couple of small memory leaks.

    On NT the NTsystem function now uses the environment as set in KCML. Revised enviroment variable support for NT and CreateProcess(). This one behaves much more like the UNIX version.

    BUGFIX: LIST SPACE could report incorrect statistics on NT.

    EuroCurrency:

    A new $CONVERT function can be used to specify two currency names and a conversion rate to convert between them.  This rate is used by PRINTUSING allow reports to dynamically switch the value of currency fields depending on the state of the HEX(10) bit in byte 47 of $OPTIONS RUN.  Currency fields are defined in PRINTUSING by using $ characters rather than the conventional #.  This means that the use of $ as a leading currency symbol must be disabled by setting STR($OPTIONS,4,1)="#".

    Furthermore if $CONVERT is set to non-blank then KCLIENT will enable a titlebar button allowing the user to switch the display of currency values in DBedit boxes between the two currencies. Currency fields to be converted must be DBedit controls which have a numeric type and which have the .CanConvert property set to TRUE. The HEX(20) bit should be set in STR($OPTIONS RUN,47,1) to enable this feature. When toggled from the actual currency into EuroCurrency mode then the background of the DBedit will be switched to a color defined in the KCLIENT form window preferences. It is possible to edit in this mode and KCLIENT will convert Euro figures edited this way back into the actual currency when sending the data back to the KCML server.

    $CONVERT can be used anywhere as a string expression returning the current value of the currency conversion settings. It is set by using it on the right hand side of a LET statement e.g.

        $CONVERT="DM,EUR,1.123"

    The first two comma separated fields indicate the labels to be used on the KCLIENT button for the actual value and a converted value respectively. The third field defines the rate. All three fields must be present. Spaces are ignored. The string cannot exceed 64 characters though only the first 3 characters of the labels will be used. As the rate is divided into the actual value to do the conversion it must be non-zero. The conversion is done to the nearest cent. E.g.

        STR($OPTIONS,4,1)="#"
        STR($OPTIONS RUN,47,1)=OR HEX(10)
        $CONVERT="FF,EUR,3"
        PRINTUSING "-$$$$.$$ -####.##",5,5

    will produce the output

            1.67    5.00

    $DECLARE and OLE:

    $DECLARE allows a declaration with a variable number of arguments with the ellipsis (...) notation.

    $DECLARE 'kcmlolemethod(INT(),STR(),...)

    In this example at least 2 parameters must be supplied, but to satisfy the ellipsis, zero or more arguments may be supplied. As there is not explicit typing for these parameters in the $DECLARE the type of the argument is inferred from the type of the argument supplied. So a numeric value is inferred as INT(4), a string value as STR(). Numeric and string arrays can be passed using the DIM operator: DIM(A$()), DIM(A()). If the value is to be returned rather than sent then RETURN can be used. In the case of the arrays REDIM may be used instead, in which case the array will be re-dimensioned to the same size as the result. Examples:

    a = 'kcmlolemethod(range, "Value", REDIM a$())
    a = 'kcmlolemethod(range, "Value", RETURN NUM(a$()))
    a = 'kcmlolemethod(range, "Value", RETURN x, NUM(1.45))

    OLE automation

    Support has been added for OLE automation of program such as Microsoft Excel and other Office products and many third party applications. This is a much superior alternative to DDE. Heavily using the extended $DECLARE support above, it is possible to set and retrieve individual values or whole arrays for much greater perfomance. It is possible to invoke methods as well. Currently the support is all made through explicit calls to $DECLARE; a future version of KCML will build on this to allow access through an object type notation similar to that used for forms.

    Preserving variable capitalization:

    We have reinstated case preservation in a source control system friendly way. The capitalisation used in $DECLARE, DIM, COM, LOCAL DIM and DEFSUB will be retained in the symbol table and always recreated. Where symbols are used elsewhere in a program they will be recreated from the symbol table unless in a SAVE ASCII when they will be forced to lower case to suit CVS (this can be changed by not setting bit 0x01 in $OPTIONS LIST byte 40). As all source in CVS repositories will have variables in lower case no spurious deltas will be generated by this change. You will be able to change code to define a correct spelling in DIM or $DECLARE and that capitalization will then be used in the ditor everywhere.

    General:

    Enable Pentium Pro/II compiler optimizations. Rebasing of DLLs now done explplicitly so that they will always load at the same address for faster KCML startup and reduced memory.

    When doing a$=$PSTAT(part) check that part still exists, and if not return an empty pstat entry.

    Byte 33 of $MACHINE now has the client's KLANG in it determined automatically by a 5.02 kclient. $MACHINE is now 36 bytes long.

    Set working directory to be the path of the program supplied on command line, if '-s' flag set. Useful when KCML is started as a daemon.

    We now get the userid in syslog() messages, even for daemon processes

    KCML browser could error looking up anchor references

    Tidied up P31 minor error numbers

    $MACHINE is now 40 bytes. Byte 34,2 is the max #TERM possible and 36,2 is the max #PART possible.

    REF2137: autosave after SAVE could dump - Fixed.

    Installation script kcmlinst now has '-n' flag which disables running KCML check, useful for 5.01 to 5.02 upgrades

    Misc Bug fixes:

    REF2403: Only reset CI and CO on exit if we were able to initialise the DET otherwise if no berror.d found we could dump.

    REF2371: Allow client clipboard to be deviced using the WKCML4 grammar. When deciding clipboard isn't really a windows printer look for the closing bracket just in case there's a printer called clipboardsomething.

    BUGFIX: LIST DCT will now print user and group id's as a decimal number if their names cannot be found. LIST DCT could coredump if we tried to read a directory we didn't have permission to open. Improved pattern matching eg "/dir", "C:\dir" work. LIST DCT could cause the editor to hang under Unix. LIST DCT was not allocating screen buffer correctly when resizing console window.

    BUGFIX: Added STR($OPTIONS RUN, 51,1) to control explicit $REWIND and implied $REWIND on $CLOSE for printers. Set to HEX(03) for normal use. This supports $CLOSE to the IBM parallel port on AIX 3.1 when set to HEX(00).

    BUGFIX: Fixed GPF that escaped our exception handler if data was arriving from the client while a $RELEASE function was copying pages.

    BUGFIX: COMPAT40 was not fully implemented on SAVE

    REF 2423. fixed. SELECT PASSWORD could loop sometimes becuase of a variable not initialised becuase some code had been knocked out for WINNT platforms.

    BUGFIX: $RELEASE function was failing on DEC ALPHA. Now fixed. Also $RELEASE function was always returning -2 to parent and not returning the child partitions exit code. Also fixed is a problem whereby 'ON ERROR' could hang in $RELEASE'ed partitions.

    BUGFIX: Added VK_ESCAPE for Hungarian keyboard

    BUGFIX: TRACE of WHILE-WEND, REPEAT-UNTIL, NEXT and RETURN broken

    DIM(a$()) in function arguments.

    Calling functions with string arrays has a new qualifier to force passing as array and not conversion to a string.

    a = 'fn(a, DIM(A$()))

    BUGFIX: Saving programs with very long lines onto a platter could clobber the following program in the platter. The check for exceeding the available space was performed and then we wrote it anyway.