Thursday August 26, 2004 dL4 for Windows Runtime 5.3.4 Maintenance Release All Rights Reserved. Copyright (c) 1997 - 2004 by: Dynamic Concepts, Inc. Aliso Viejo, CA 92656 USA Email address: techsupport@dynamic.com Information: www.unibasic.com Downloads: ftp.dynamic.com Pre-installation instructions ============================= o WARNING: This release will NOT run with existing SSNs that use a license number that begins with "FE". These obsolete SSNs include almost all SSNs created before December 2001. Please contact the Dynamic Concepts Sales department for information on replacing SSNs that use "FE" license numbers. Please read the following Passport section for additional licensing information. o This release requires the use of Passport for Windows 2.2 or later. The new version of Passport for Windows requires the presence of an ethernet interface or a Dynamic Concepts hardware Passport device. Windows 95 users must use a hardware Passport or upgrade to a later version of Windows. SSNs for Passport 2.1.3 or later are machine specific and must not be installed on more than one system. Unlike previous versions of dL4 for Windows, the number of simultaneous dL4 sessions will be restricted to the licensed number of users plus three phantom ports or extra window sessions. o This release requires an SSN authorized for release 5 of dL4. In order to use the MySQL drivers, the SSN must be authorized for the MySQL option. Please contact the Dynamic Concepts Sales department for information on obtaining required SSNs. o Problem reports should be emailed to techsupport@dynamic.com. All problem reports should contain a description of the problem, the operating system name/revision, and, if at all possible, a reproducible sequence Installation instructions ========================= To install dL4 for Windows, perform the following steps: 1. Remove any previous dL4 for Windows release. 2. Run the dL4 installation program 1B_dl4_5.3.4.exe and follow the displayed instructions. Press "Yes" when the program asks if Passport should be installed. 3. If you haven't registered your license and SSN using the Passport ssnmaint utility, run ssnmaint. dL4 cannot be used until Passport is installed and your license registered. 4. If you intend to use loadsave.exe, add the installation directory to your PATH variable. 5. If data files will be accessed over a network, run checksys.exe from the installation directory to detect out-of-date or misconfigured operating system modules. The checksys utility should be run on each Windows client system and each Windows file server in the network. See the "Networking" section below for details. File list ========= readme.txt This file license.txt Runtime license terms and conditions checksys.exe Utility to detect operating system configuration problems codebase.dll Runtime library dcictree.dll Runtime library dl4basic.dll Runtime library dl4chwin.dll Runtime library dl4fldrv.dll Runtime library dl4pipe.exe Internal utility used by the pipe driver dl4rt.dll Runtime library dl4servr.exe Network service utility to run a dL4 program whenever a TCP connection is made to a specific IP address and port number (for Windows NT, 2000, or XP only) dl4sockt.dll Runtime library dl4stdrv.dll Runtime library loadsave.exe dL4 compile-and-save console program msvcrt.dll Runtime library msvcrt40.dll Runtime library ntwdblib.dll Runtime library pfilter.exe Printer character translation filter runc.exe Special version of BASIC interpreter for CGI programs and piped I/O runw.exe BASIC interpreter scopec.exe Special version of dL4 IRIS-style command interpreter for CGI programs and piped I/O scopew.exe dL4 IRIS-style command interpreter stubwa10.dll Runtime library dfltlp.bat Printer script for default Windows printer selectlp.bat Printer script for user selected Windows printer printer\ Directory of printer scripts term\ Directory of terminal definition files for use with scopec.exe and runc.exe tools\ Various utilities Highlights of This Release ========================== o The Full-ISAM Bridge driver has been enhanced to support unbalanced indexes by allowing such indexes to be placed in separate Indexed Contiguous or Full-ISAM files outside the main Full-ISAM file. o The Full-ISAM Bridge driver has been enhanced to support reading records by record number without SEARCHing for a key. o The Full-ISAM Bridge driver has been enhanced to support keys containing record number values. o The Full-ISAM Bridge driver has been enhanced to support programs that accidentally read character values across record boundaries. o The MySQL Full-ISAM driver has been enhanced to fully support AUTO_INCREMENT columns. o The Microsoft SQL Server Full-ISAM driver has been enhanced to fully support IDENTITY columns. o The Microsoft SQL Server Full-ISAM driver has been enhanced to support creating and deleting tables. o New GUI mnemonics have been defined to display standard Windows message boxes. o Two new intrinsic string functions has been added to simplify replacing string values within strings. o EOPEN is supported for text and uniBasic files. New in This Release ================================================================= Aug 26 2004 (Maintenance Release 5.3.4) o The email driver has been enhanced to support user authentication on SMTP servers that require user authentication. To enable authentication, the OPEN statement option parameters or the DL4EMAILSERVER runtime parameter must specify the new "user" and "password" (or "pswd") options. These options must not be specified unless the SMTP server supports authentication. Examples: Open #5,"(user=fred,password=secret,from=fred)henry" As "Email" set DL4EMAILSERVER=smtp.something.com,user=fred,password=secret In addition to the new "user", "password", and "pswd" options, an additional "auth" option has been added to allow selection of a specific authorization method. The email driver currently supports the three most common methods: "LOGIN", "PLAIN", and "CRAM-MD5". The driver will use the best method available on the SMTP server with preference given to "CRAM-MD5" because it does not transmit the actual password over the network. The "auth" option can be used to select the "LOGIN" or "PLAIN" method if the SMTP server provides an incompatible "CRAM-MD5" method. If the "auth" option selects a method that is not supported by the SMTP server, the email driver will attempt to connect without authenticating the user. Example: set DL4EMAILSERVER=smtp.something.com,auth=login Note: for compatibility with previous releases, the DL4EMAILSERVER value, if defined, must begin with a server name. o Bug fixed: the SCOPE DISPLAY command and program dumps did not list string members of structure variables that had null ("") values. Jun 23 2004 (Maintenance release 5.3.3) o Two new printer drivers, "Terminal Printer" and "Default Terminal Printer" have been added to open a named or the default printer via dL4Term on a client PC. o A new intrinsic CALL, UBSTRING(), and two new intrinsic functions, UBASC() and UBCHR$(), have been added to provide uniBasic-like character conversion routines. The parameters and return values of the routines are identical to CALL STRING(), ASC(), and CHR$() except that ASCII characters are mapped to the integer range 129 through 255 and uniBasic compatible mnemonics are mapped to the range 1 through 127. These routines can be used to simplify conversion of uniBasic programs to dL4. o Bug fixed: the intrinsic CALLs UNPKDEC21(), UNPKDEC46(), UNPKRDX5019(), and UNPKRDX5049() copied random data into the destination variable after the unpacked data. o Bug fixed: Mode 4 of CALL STRING() did not add a string terminator after the converted character value. o Bug fixed: the "Page Printer" driver could not open a quoted printer name (needed for printer names with spaces). May 21 2004 (Maintenance release 5.3.2) o A new open option, "CONTENT=HTML" has been added to the email driver to send email with HTML formatting commands. The driver enables HTML formatting, but it does not add formatting commands itself. The application is responsible for all HTML formatting commands as shown in the following example: Opts$ = "(From=someone,Content=html,Subject=''(test)'')" Open #1,Opts$ + "somebody" As "Email" Print #1;"This is bold and this is underlined." Close #1 The open option "CONTENT=TEXT" selects non-HTML text format (the default). o Bug fixed: percent sign ("%") and underscore ("_") characters were converted to "\%" and "\_" when adding data to or searching in MySQL tables using the MySQL driver or the MySQL Full-ISAM driver. o Bug fixed: the Windows Page Printer driver, when used in binary output mode, added a null at the end of each write. May 11 2004 (Maintenance release 5.3.1) o Bug fixed: the Replace$() and ReplaceCI$() intrinsic string functions corrupted memory when replacing a single character with a multiple character string. o Bug fixed: CALL INPBUF() inserted typeahead characters at end of the typeahead buffer when used with dL4Term instead of at the beginning of the buffer as done for other terminal types. Apr 14 2004 (Release 5.3) o The Full-ISAM Bridge driver has been enhanced to support keys that contain the current record number when the Bridge driver is used with the MySQL Full-ISAM driver or the Microsoft Full-ISAM driver. In the Bridge profile, a record number segment of a key must reference the IDENTITY column of the Full-ISAM table and use the NTOC(), STR(), NTVNTOC(), or NTVSTR() functions to convert the IDENTITY column value to a character format. To use this feature, the option "RealRecordNumbers" must be enabled. o The Full-ISAM Bridge driver has been enhanced with two new conversion functions: STR() and NTVSTR(). These functions are similar to NTOC() and NTVNTOC(), but they use a simpler mask consisting only of spaces and a single "#" character. The "#" character is replaced with a default conversion of the number and any spaces are copied. The purpose of the STR() and NTVSTR() functions is to duplicate fields that are created by simple assignment or concatenation of numeric values: TheKey$ = "Name", RecNo Bridge profile example: KeyPart=IDCOL,5,7,"","0123456789",STR("#") o A new option has been added to the Full-ISAM Bridge driver profile to support unbalanced indexes by allowing such indexes to be placed in separate Indexed-Contiguous or Full-ISAM files outside the main Full-ISAM file. For example, if index 3 of an Indexed-Contiguous file is used as a scratch index with entries for only some of the file records (and is thus unbalanced), that index could not be emulated by the Bridge driver within the main Full-ISAM file because Full-ISAM files do not support unbalanced indexes. Using the new option, the index can be emulated by declaring an external index in the bridge profile. For example: [Index3] File=filename Index=1 KeyPart=name,0,10 This example directs the bridge driver to perform all SEARCH operations on index 3 by applying the SEARCH operations to index 1 of the Indexed Contiguous file "filename". The bridge profile would also have to use the "RealRecordNumbers" option described below so that the record numbers in the keys of index 3 could be used to reference records in the main Full-ISAM file. External indexes can have multiple keys for the same record or use multiple key formats. The data in the key is completely controlled by the application and does not need to be present in any of the fields of the main Full-ISAM file. An external index definition can only have one "KeyPart" entry and, if the external index file is indexed contiguous, the field name is ignored (but it must be specified). External index files can either be Indexed Contiguous files or Full-ISAM files. If an Indexed-Contiguous file is used, the bridge driver will only access the index portion of the file. To use a Full-ISAM file as an external index file, the following format must be used in the bridge profile: [Index3] File=filename Name=indexname KeyPart=keyfieldname,0,10,,,Strip RecPart=recnbrfieldname where "filename" is the name of the external Full-ISAM file, "indexname" is the name of the index within the Full-ISAM file, "keyfieldname" is the name of the Full-ISAM field used for the key (this must be a character field), and "recnbrfieldname" is the name of the Full-ISAM field used for the record number (this must be a numeric field). External index definitions can include "Filename", "Protection", "Options", "OpenAs", and "OpenInProfileDirectory" entries using the same format and function as such entries in the main bridge profile section. If the file protection option is not specified, the protection options used to open the main Full-ISAM file will be applied when opening the external index file. o A new option has been added to the Full-ISAM Bridge driver profile to support programs that accidentally span a record boundary when reading string values. When set to TRUE, the option "TruncateSpanning" disables the normal "Illegal item number" (error 53) error that is reported when a program reads a character variable whose length extends beyond the end of the record. The driver will treat such reads as if the read ended exactly at the end of the record. Example: [FullISAMBridge] File=filename OpenAs=FoxPro Full-ISAM TruncateSpanning=True o A new option has been added to the Full-ISAM Bridge driver profile to support programs reading records by record number. When set to TRUE, the option "RealRecordNumbers" causes the driver to return the actual Full-ISAM file record number when performing SEARCH statements that return a record number. The record numbers returned by SEARCH can then be used to perform random reads from the file. The option can only be used with Full-ISAM drivers and files that support searching index 0 for equal record numbers. Example: [FullISAMBridge] File=filename OpenAs=FoxPro Full-ISAM RealRecordNumbers=True o The FoxPro Full-ISAM driver has been extended to support a SEARCH-equal operation on index 0 using a record number as the key value. Such searches can be performed on any FoxPro Full-ISAM file. Example: SEARCH = #5,0;R o The MySQL Full-ISAM driver has been extended to support a SEARCH-equal operation on index 0 using a record number as the key value. Such searches can be performed only on tables that contain an AUTO_INCREMENT column and a unique index based only on that column. The value of the AUTO_INCREMENT column is treated as the record number of the row. Example: SEARCH = #5,0;R o The MySQL Full-ISAM driver has been enhanced to support tables whose only unique index contains an AUTO_INCREMENT column. o The MySQL Full-ISAM driver has been enhanced to support the creation of tables with numeric IDENTITY (AUTO_INCREMENT) columns. A table can contain only one IDENTITY column which must be an integer type (such as 1%, 7%, %1, or %2). Creating a table with an IDENTITY column will automatically create a unique index based on that column (the primary key). Example: Def Struct REC Member S$ : Item "LABEL" Member %2,Id : Item "IDCOL" : Identity End Def Dim Rec. As REC Build #2,"test.table" As "MySQL Full-ISAM" Define Record #2;Rec. Close #2 o The Microsoft SQL Server Full-ISAM driver has been extended to support a SEARCH-equal operation on index 0 using a record number as the key value. Such searches can be performed only on tables that contain an IDENTITY column and a unique index based only on that column. The value of the IDENTITY column is treated as the record number of the row. Example: SEARCH = #5,0;R o The Microsoft SQL Server Full-ISAM driver has been enhanced to support tables whose only unique index contains an IDENTITY column. o The Microsoft SQL Server Full-ISAM driver has been enhanced to support creating tables with the BUILD statement and deleting tables with the KILL statement. An "AS" clause must be used with either statement to specify the driver. Example: KILL "(user=bill,pswd=notsosecret)test.info" AS "MSSQL Full-ISAM" o The Microsoft SQL Server Full-ISAM driver has been enhanced to accept a default server name, database name, user name, and/or password from a new runtime parameter, "DL4MSSQLISAM". The runtime parameter can be placed in the environment or in the registry and supports the comma separated options "server=name", ,"database=name", "user=name", "password="string", and "pswd=string". Example for a Windows command line shell: C:\> Set DL4MSSQLISAM=server=myserver,user=anonymous Note: defining passwords in the environment or the registry is insecure. If at all possible, Windows Authentication based on the current login should be used instead of explicit user names and passwords. o A new GUI mnemonic, 'FRAME', has been defined for use with dL4Term or dL4 for Windows. The new mnemonic draws a frame around a specified rectangle. The mnemonic has two formats: PChr$(Left,Top,Right,Bottom);'FRAME'; PChr$(Left,Top,Right,Bottom,Type$);'FRAME'; The optional "Type$" parameter specifies the frame style which can be either "Sunken" ("S"), "Raised" ("R"), "Etched" (E), or "Bump" ("B"). If the "Type$" parameter is omitted or is "", the frame style will be similar to that of a 'WCSTRING' input box. When using the 'FRAME' mnemonic, sufficient space must be left around the rectangle to draw the frame. The frame is not a GUI element; it is drawn graphically like the 'RECT' mnemonic and the frame can be overwritten by characters or graphics. The frame color is determined by the current Windows color scheme and is not controlled by any of the color mnemonics. o Four new GUI mnemonics, 'WCMSGASK', 'WCMSGERROR', 'WCMSGINFO', and 'WCMSGWARN', have been implemented to display standard Windows message dialog boxes. All of the mnemonics have three formats as shown below for the 'WCMSGASK' mnemonic: PChr$("Message");'WCMSGASK'; PChr$("Message","Title");'WCMSGASK'; PChr$("Message","Title","Options");'WCMSGASK'; The "Options" string determines the number and labeling of the buttons within the message box: "ARI" "Abort", "Retry", "Ignore" "O" "Ok" "OC" "Ok", "Cancel" "RC" "Retry", "Cancel" "YN" "Yes", "No" "YNC" "Yes", "No", "Cancel" The characters in the "Options" string may be in lower or upper case, but the first uppercase letter will select the associated button as the default button. The message box returns as input the uppercase label string of the button selected by the user followed by a carriage return. Example: Print PChr$("Continue?", "I/O Error", "yN");'WCMSGERROR'; Print 'IOEE K0'; Input "";I$ Select Case I$ Case "YES" . . Case "NO" . . End Select o A new function, MSC$(9), has been implemented to return the native absolute path of the directory containing the current program file. o The tools/term utility has been enhanced to optionally display the channels open on each monitored port. The "F" option ("term all mf") shows each open channel number, the filename open on the channel, and, if supported, the current record number. The record number is followed by a letter showing the lock status of the record. The status letters are "U" (unlocked), "L" (locked), and "B" (blocked waiting for a record lock). o The tools/term utility has been enhanced with a "B" option to display only ports that are blocked waiting for a record lock. For each blocked port, the utility finds and displays the port number of the program which is currently locking the desired record. Example: term all mb o New options have been added to the tools/query utility. The "-p" option enables division of long displays into screen sized pages. The "-l", "-l=$printer", "-l=path" options direct output to the "$lpt" printer, "$printer" printer, or the "path" text file respectively. o The PORT mode 7 statement has been enhanced to optionally return the group name, current directory path, terminal type, numeric account, and numeric group for the selected port. The group name, numeric account, and numeric group values are returned as "" under Windows. PORT portnum,7,status,userid$,station$,group$,dir$,term$,usern$,grpn$ Note that the PORT mode 7 statement may have between 5 and 10 parameters. o The PORT statement has been extended with a new mode, 8, that returns the open channels on the specified port. The statement PORT portnum,8,status,firstchan,lastchan,chaninfo.[] returns open channel information into the array 'chaninfo.[]' for channels between 'firstchan' and 'lastchan'. The 'chaninfo.[]' variable must be an array of structures using the following structure definition: Def Struct CHANINFO Member 1%,ChanNum Member Path$[200] Member 3%,RecordNum Member 1%,RecordState End Def The member names, dimensioned size of the Path$ member, and the numeric precisions of the other structure members can be varied as desired. The filename returned in Path$ may be truncated if it is longer than Path$ or if it exceeds system limitations. If the number of open channels in the specified range is less than the dimensioned size of 'chaninfo.[]', then the first unused element of the array will have a ChanNum value of -1. If the number of open channels in the specified range is greater than the dimensioned size of 'chaninfo.[]', the extra channels will be ignored. o The PORT statement has been extended with a new mode, 9, that determines if a specified file is open on the port and optionally determines if a specified record number is locked in the file. The statement PORT portnum,9,status,filepath$,recordnum,channum performs an inquiry on port 'portnum' to determine if it has 'filepath$' open on a channel with the record 'recordnum' locked. If 'recordnum' is negative, the search will be performed using only the file path. If a match is found, the channel open to the file will be returned in 'channum'. If a match is not found, then 'channum' will be set to -1. o The CALL MONITOR() procedure in the tools/oldcalls.lib compatibility library has been enhanced to return current directory, terminal type, and open channel information. o A new open option has been added to the Windows Page Printer driver. The "wrap=" option enables or disables line wrapping for lines that exceed the maximum line length. The default is to disable line wrapping and truncate long lines. Example: OPEN #5,"(wrap=true)$selectlp" o The EOPEN statement and the intrinsic CALL LOCK() can now be used with text files. If a text file is opened using EOPEN or locked with CALL LOCK(), the file cannot be opened by other dL4 users. Unlike portable contiguous and formatted files, the EOPEN statement will succeed on text files that have been opened for shared usage by other ports. o The intrinsic CALL SORTINSTRING() has been extended to support sorting arrays of strings or arrays of structures where the first structure member is a string. New formats: Call SortInString(status,keycnt,keylen,keys$[],work$) Call SortInString(status,keycnt,keylen,keys.[],work.) The 'work$' and 'work.' variables should be identical to individual elements of the 'keys$[]' and 'keys.[]' arrays. The 'keylen' value specifies the maximum number of significant characters in the sorted values and can be used to perform a sort on the first 'keylen' characters of each key value. o The statement SYSTEM 33,"C:\\Program Files\\Application\\program.exe",S will try to execute "program.exe" on the user's PC. The variable "S" will be set to zero if the program was successfully started and non-zero if the program couldn't be started. Unlike SYSTEM or SYSTEM 31, the statement does not wait for the program to finish and exit. In the default configuration, the user will be prompted via a message box to permit or deny running the command. The DWORD registry value HKEY_CURRENT_USER\Software\DynamicConcepts\dL4\WinTerm\AllowSYSTEMCmd or HKEY_LOCAL_MACHINE\Software\DynamicConcepts\dL4\WinTerm\AllowSYSTEMCmd can be set to one to automatically accept commands without displaying the message box (note: if set to zero, an "AllowSYSTEMCmd" value in HKEY_CURRENT_USER will require the message box no matter how the HKEY_LOCAL_MACHINE value is set). o The console versions of dL4, scopec.exe and runc.exe, now support the use of dL4Term as a client under Windows telnet servers. The "Windows Terminal Printer" driver has been added to dL4 for Windows for use with dL4Term. o The dL4 QUERY utility (tools/query) has been extended to display whether a Full-ISAM field is an IDENTITY field. o Behavior change: the object revision in program files is now set more accurately. This improvement will permit more programs saved under a current version of dL4 to run under older versions of dL4. o Behavior change: the SYSTEM statement now searches additional directories when attempting to execute an operating system command. For example, the SYSTEM statement can now execute "iexplore.exe" (Internet Explorer) without an absolute path to the executable. o Behavior change: WCNUMBER boxes now accept commas as valid input characters. If the WCNUMBER box value is queried, the commas will not be returned as part of the value. o Behavior change: WCTEXT boxes no longer display scroll bars if the number of lines is exactly equal to the size of the text box. o Behavior change: tab characters in source line comments are expanded into spaces using the indentation value as the tab width. o Bug fixed: the dL4 IC2FI (tools/ic2fi) utility did not allow users to convert files if the original key length of an index was longer than the key length in the bridge profile. This prevented conversion of files because key lengths in Indexed Contiguous files are normally rounded up to even values and are thus longer than the actual key size. The utility now displays a warning message, but allows the user to continue conversion. o Bug fixed: using the CHF() function with the Microsoft SQL Full-ISAM driver caused any subsequent SEARCH, READ, WRITE, ADD, or DELETE statement using the same channel to fail. o Bug fixed: when using the Microsoft SQL or MySQL Full-ISAM drivers with an identity column as the unique index, an attempt to modify the identity column could sometimes cause the wrong row to be modified. o Bug fixed: the PORT 6 statement returned zero instead of -1 when the blocking port number was unknown. o Bug fixed: the Microsoft SQL Server Full-ISAM did not support record number based SEARCH statements if there was a non-IDENTITY based index that had a key size smaller than the IDENTITY based index (a key size of 3 or fewer characters). This prevented the Full-ISAM Bridge driver from supporting the "RealRecordNumbers" option. Dec 5 2003 (Maintenance release 5.2.4) o Bug fixed: GUI element labels and list box items were not sized correctly if the GUI element font size differed from the standard dialog font size. o Bug fixed: if the canvas was taller than the window, the display was corrupted and the scroll bar did not work. o Bug fixed: if the main window was minimized and then restored, scroll bars were displayed. o Bug fixed: a scroll bar was displayed in a GUI list box if the number of elements equaled the maximum number that could be displayed in the box. Aug 12 2003 (Maintenance release 5.2.3) o Bug fixed: the scroll bars did not work when the window was smaller than the canvas. o Bug fixed: memory violations occurred with some combinations of fonts and font sizes. o Bug fixed: the DUPLICATE statement produced incorrect filenames for FoxPro Full-ISAM files if a trailing "!" was used. Jul 21 2003 (Maintenance release 5.2.2) o A new intrinsic function, CALLSTAT$(), has been implemented to return a string describing the program position at a specified level in the procedure stack. This function would typically be used to generate information for an error log. The procedure stack includes all function, procedure, Call-Subprogram, and SWAP levels. The level type ("Swap", "SubPgm", "ExtSub", "ExtFunc", "IntSub", "IntFunc", or "") is returned in a function argument. The current position is level 0, the caller is level 1, and so on. An error 38 is generated if a non-existent level is specified. BASIC syntax: CallStat$(Level, LevelType$) Example: Print "Caller position is ";CallStat$(1,Type$) Print "Caller type is ";Type$ o Behavior change: copy/paste operations now supply spaces between pasted characters when necessary. o Bug fixed: the bridge driver could not insert records in a MySQL table if a key contained a DECIMAL(n,0) column. o Bug fixed: the makehuge utility could not convert files that used key translation. o Bug fixed: CALL DATE() did not properly convert six character dates to eight character dates. o Bug fixed: the socket driver did not work if certain third-party network driver extensions were installed on the system. o Bug fixed: some rare situations would cause the main window to freeze. o Bug fixed: input did not work with bidirectional auxiliary devices. o Bug fixed: the edit menu was sometimes printed as part of a print screen operation. o Bug fixed: the FoxPro Full-ISAM driver "dataext" option created files with duplicated extensions ("file.ext.ext"). o Bug fixed: the DXTESTIN, DXTESTOUT, and DXTESTCOPY environment variables could not be set via CALL ENV() and used with the dynamicXport CALLs. May 14 2003 (Maintenance release 5.2.1) o A new printer type, "Bidirectional Device", is now supported as an auxiliary printer in the "Preferences->Aux Printer" dialog. When enabled, this printer type allows both writing to and reading from a device such as a serial port. o The raw file driver now supports a CRTOCRLF open option to append a line feed character when writing carriage return characters. This option is also available for the auxiliary printer and can be enabled in "Preferences->Aux Printer->Options". o The "TCP Listen Socket" driver has been enhanced to accept a new OPEN option. The new "REUSE" option enables the driver to open a socket with a port number that is already in use. This option is needed to support certain network protocols and to avoid error 76 ("File or device is open elsewhere") when re-opening a previously used TCP port number. Example: Open #1,"(reuse):9631" As "TCP Listen Socket" o The "MySQL SQL" and "MySQL Full-ISAM" drivers have been enhanced to accept a "PORT=" option in the OPEN statement or in the DL4MYSQL/DL4MYSQLISAM runtime parameters. This option makes it possible to use MySQL servers with non-default port numbers. o A new intrinsic CALL, IMSPACK(), has been implemented to provide compatibility with CALL $PACK in IMS BASIC. The syntax of CALL IMSPACK() is: Call IMSPack(Mode, Src$, Dest$) Call IMSPack(Mode, Dest$, Src$) where "Mode" equals zero packs characters from "Src$" into "Dest$" and a non-zero "Mode" unpacks characters from "Src$" into "Dest$". The packing algorithm uses a radix 50 style mechanism. o A new intrinsic CALL, TRANSLATE(), has been added to translate strings to or from binary strings according to a specified character set. The syntax and arguments of CALL TRANSLATE() are: Call Translate(DestCnt,Dest$,SrcCnt,Src?,CharSet$) Call Translate(DestCnt,Dest?,SrcCnt,Src$,CharSet$) DestCnt - receives the number of characters translated into the destination. Dest$ - destination string that receives the characters translated from Src?. Dest? - destination binary string that receives the characters translated from Src$. SrcCnt - receives the number of characters translated from the source. Src$ - source string of characters to be translated. String terminator characters are copied as data and the source size is controlled by the total size of the variable and any double subscripting. Src? - source binary string of bytes to be translated. The source size is controlled by the total size of the variable and any double subscripting. CharSet$ - character set name such as "ASCII", "ANSI", or "UTF-8". If a character cannot be translated, translation will stop. Translation errors can be detected by comparing the returned source translation count to the source size. o A new option, "P", has been added to the "TERM" utility to page long listings of active ports. The command "term all mp" would list all active ports in screen sized pages. o A new option "ADD" has been implemented in the "PGMCACHE" utility to manual add permanent entries to the program cache. The command "pgmcache add filename" would add the program or library "filename" to the program cache. The file would remain in the cache until the cache itself was deleted or the system was restarted. o A new option, "uselust", has been added to the DL4LUST runtime parameter to import a search path from the "LUST" environment variable. The imported search path is placed after any entries in DL4LUST. o The SCOPE BASIC mode LIST command now supports a "-c" option to disable paging of the listing. o A new option, "/t description-string", has been added to dl4servr.exe to configure a descriptive string when installing a dl4servr service. o Behavior change: flicker is reduced, under some conditions, when adding text to a text or edit box. o Bug fixed: the display window was sometimes displayed in an incorrect position in the base window after the window had been maximized and the 'NR'/'WD' mnemonics had been used. o Bug fixed: when an indexed contiguous file was opened in read-only mode (ROPEN), recent changes to the index were sometimes ignored. o Bug fixed: the CHARSET and NUMMAP options could not be used when building a formatted file. Apr 7 2003 (Release 5.2) o Two new GUI mnemonics, 'WCSETCOLOR' and 'WCRESETCOLOR', have been defined to set the text and background colors in newly created GUI elements. The 'WCSETCOLOR' mnemonic copies the current window foreground and background colors. Alternatively, the 'fg bg WCSETCOLOR' mnemonic uses two numeric parameters, the text and background colors. The 'WCRESETCOLOR' mnemonic restores the standard system colors. The 'WCSETCOLOR' and 'WCRESETCOLOR' mnemonics can be printed directly to a GUI element to immediately change the text and background colors for that GUI element. o A new GUI mnemonic, 'WCMARKCOLOR', has been defined to set the text and background colors for items that have been selected by the user in GUI list boxes ('WCLIST', 'WCEDITLIST', ...). The colors are also used for items selected by the 'WCMARK mnemonic. If the 'WCMARKCOLOR' mnemonic is printed to a window, all GUI list elements subsequently created in that window will use the specified colors. The 'WCMARKCOLOR' mnemonic can be printed to a GUI element box to set or change selection colors in only that GUI element. The 'WCMARKCOLOR' mnemonic has three formats: 'WCMARKCOLOR' - use the current window text and background colors 'fg WCMARKCOLOR' - use "fg" as the text color and the current window background color 'fg,bg WCMARKCOLOR' - use "fg" as the text color and "bg" as the background color. The color values "fg" and "bg" are numbers between -6 and 2^24 as used in the 'FONTCOLOR' and 'BACKCOLOR' mnemonics. The 'WCRESETCOLOR' mnemonic can be used to restore the standard selection colors. As with all other GUI mnemonics, this mnemonic can only be used with dL4Term or in dL4 for Windows. o Color can now be controlled on a character by character basis within the list boxes of 'WCLIST', 'WCEDITLIST', 'WCDROPLIST', and 'WCEDITDROP' GUI elements. The text and background colors are set using the normal 'FONTCOLOR' and 'BACKCOLOR' mnemonics. o Four new standard color numbers have been defined for use with all color mnemonics such as 'FONTCOLOR'. These negative colors numbers are defined as follows: -3 System standard window text color -4 System standard window background color -5 System standard highlighted text color -6 System standard highlighted text background color o A new mnemonic, 'n WCASKCOLOR', has been implemented to display the standard window color selection dialog and return the color selected, if any, by the user. The mnemonic requires a single numeric parameter which is the default RGB color for the dialog. The dialog returns the selected color as a decimal input string followed by a carriage return. If no color is selected, a null string will be returned followed by a carriage return. o Double clicking on edit box elements such as WCSTRING or WCTEXT can now be detected by using the 'WCACTION' mnemonic to set the double click action string as action number 2. Example: PRINT PCHR$(10,2,'F40');'WCACTION'; o Window contents can now be printed to a user selected printer by sending a print screen mnemonic ('PS') to a window or by the user selecting the "Edit->Print Window" menu. o The main window can now be maximized to occupy the entire screen. The new "Preferences->Frame" dialog configures the pattern and colors used to fill the area outside the display window. o Double clicking on list box elements or buttons can now be detected by using the 'WCACTION' mnemonic to set the double click action string as action number 2. Example: PRINT PCHR$(10,2,'F40');'WCACTION'; o A new driver, "MySQL SQL", has been implemented so that applications can use SQL statements to issue commands and queries to a MySQL server. The driver allows an application to access the full capabilities of MySQL including both standard SQL syntax and MySQL specific features. Due to MySQL licensing requirements, the driver cannot be used without a special SSN product option. Please contact the Dynamic Concepts Sales department for information on obtaining the required SSN. The OPEN statement uses a special filename syntax with two formats: "server:database" and "database". Rather than opening a specific table, the OPEN statement creates a connection to a MySQL server and sets the default database to be used by SQL statements. If the server name is not specified, the system on which the program is running will be used as the server (unless a default server is specified in the DL4MYSQL runtime parameter, see below). The OPEN statement also supports four comma separated options: "user=name", "password=string", "pswd=string", and "rtrim=boolean". These options supply server login identification and, in the case of "rtrim", control whether character fields are returned space filled (default) or with trailing spaces removed ("rtrim=true"). Examples: OPEN #1,"mysystem:accounting" AS "MySQL SQL" OPEN #5,"(user=bill,pswd=secret)testdb" AS "MySQL SQL" The server name and login information can be specified in the environment variable "DL4MYSQL" which supports the comma separated options "server=name", "user=name", "password="name", and "pswd=name". Example for a Unix command line shell: $DL4MYSQL="server=myserver,user=anonymous" $export DL4MYSQL $scope SQL statements are executed by using SEARCH statements. Each SEARCH statement specifies a channel open to a MySQL server and an SQL statement as a character string. Examples: SEARCH #1;"select * from testtable" SEARCH #5;"update acctgtbl set balance=123.45 where account=19765" SEARCH #5;"drop table testtable" If the statement fails, an error will occur. Syntax errors in SQL statements are reported as error 274, "SQL syntax error". After an SQL SELECT statement is successfully executed, the number of rows in the result set can be determined by using the CHF(channel) function. The result set itself is read by using normal READ and READ RECORD statements. An error 52, "record not found", will be reported by any statement attempting to read beyond the end of the result set. Example: Search #7;"select account, balance from acctgtbl" Print Chf(7);"rows returned by query" Do Try Read #7;Account,Balance Else Exit Do Print "Account =";Account;" ";Balance =";Balance Loop Note: the result set of the current SQL SELECT statement is copied into memory by the dL4 SEARCH statement. SELECT statements should be written so as to limit the size of the result set to a reasonable value. An SQL LIMIT clause can be used in the SQL SELECT statement to restrict the maximum size of the set. The MAP RECORD statement can be used to map structure variable members according to their item names to the columns returned by a query. In the following example, the SQL select statement returns a two column result "account, balance" which is mapped into a structure variable that uses the opposite ordering: Def Struct RSET Member 3%,Balance : Item "balance" Member 3%,Acct : Item "account" End Def Dim R. As RSET Search #7;"Select account, balance from acctgtbl" Print Chf(7);"rows returned by query" Map Record #7 As RSET Do Try Read Record #7;R. Else Exit Do Print "Account =";R.Acct;" ";Balance =";R.Balance Loop NULL values in numeric, date, or character columns are converted to special values when they are read. When adding new rows or modifying existing rows, NULL values can be written by using the same special values. In this version of dL4, the special values are -1E62 for numeric values, "January 1, 0001" for date values, and "\xffff\" for strings. Programs should not test for or set these values directly. Instead, new intrinsic functions have been provided to test for NULL values and to set NULL values. The intrinsic function IsSQLNull() returns 1 when its argument is a NULL value and 0 for all other values. The intrinsic functions SQLNull(), SQLNull#(), and SQLNull$() return the special NULL values for numbers, dates, and strings. NULL values cannot be read into or written from integer numeric variables or 1% date variables. NULL values are not supported for binary variables ("B?"). Three new intrinsic functions, SQLV$(), SQLN$(), and SQLNV$() are provided to make it easier to construct SQL statements. The SQLV$() function takes one or more arguments of any non-array type and returns a string containing the argument values encoded for use by an SQL driver. The SQL driver detects such encoded values in the SEARCH statement string and formats the values as required by the SQL server. This formatting guarantees proper quoting of character string values and places commas between each value. If the argument is a structure variable, each member of structure is encoded. The SQLN$() function takes a single structure variable argument and returns a string containing the member item names encoded for the SQL driver with commas separating each name. The SQLNV$() function takes a single structure variable argument and returns a string containing the member names and values encoded for the SQL driver with equals signs ("=") and commas. Examples: Search #1;"Insert test (count,label) Values ("+SQLV$(C,L$)+")" Search #1;"Insert test ("+SQLN$(R.)+") Values ("+SQLV$(R.)+")" Search #1;"Update test Set "+SQLNV$(R.)+" where count=19" o A new driver, "MySQL Full-ISAM", has been implemented to support Full-ISAM and Bridge access to MySQL database tables. Due to MySQL licensing requirements, this driver cannot be used without a special SSN product option. Please contact the Dynamic Concepts Sales department for information on obtaining the required SSN. The MySQL driver implements the standard Full-ISAM driver interface with the following modifications: 1. The InnoDB table type must be used in order to support record locking. Other table types may be usable, but they will not support record locking. 2. A table must have at least one unique index in order to support reading or writing. A table without a unique index can be opened only to extract table information or to add indexes. 3. The OPEN statement uses a special filename syntax with the two formats: "server:database.table:" and "database.table". If the server name is not specified, the system on which the program is running will be used as the server. The OPEN statement also supports four comma separated options: "user=name", "password=string", "pswd=string", and "rtrim=boolean". These options supply server login identification and, in the case of "rtrim", control whether character fields are returned space filled (default) or with trailing spaces removed ("rtrim=true"). Examples: OPEN #1,"mysystem:accounting.customers" AS "MySQL Full-ISAM" OPEN #5,"(user=bill,pswd=secret)test.info" AS "MySQL Full-ISAM" 4. The KILL statement uses the same filename syntax as the OPEN statement and supports the "user=name", "password=string", and "pswd=string" options. Example: KILL "(user=bill,pswd=secret)test.info" AS "MySQL Full-ISAM" The server name and login information can be specified in the environment variable "DL4MYSQLISAM" which supports the comma separated options "server=name", "user=name", "password="name", and "pswd=name". Example for a Unix command line shell: $DL4MYSQLISAM="server=myserver,user=anonymous" $export DL4MYSQLISAM $scope The MySQL driver has been tested with MySQL versions 3.23.42 through 3.23.53. InnoDB tables are an optional feature of MySQL and require installing both an InnoDB capable version of MySQL and setting optional configuration parameters. Please see the MySQL documentation for information on installing and configuring a MySQL server. o The new MySQL Full-ISAM driver has an open option, "nulls=true", to support read and writing NULL values to table columns. When a table is opened with the "nulls=true" option, NULL values in numeric, date, or character columns are converted to special values when they are read. When adding new records or modifying existing records, NULL values can be written by writing the same special values. Currently, the special values are -1E62 for numeric values, "January 1, 0001" for date values, and "\xffff\" for strings. Programs should not test for or set these values directly. Instead, new intrinsic functions have been provided to test for NULL values and to set NULL values. The intrinsic function IsSQLNull() returns 1 when its argument is a NULL value and 0 for all other values. The intrinsic functions SQLNull(), SQLNull#(), and SQLNull$() return special NULL values for numbers, dates, and strings. NULL values cannot be read into or written from integer numeric variables or 1% date variables. NULL values are not supported for binary variables ("B?"). NULL values can be used in keys and index columns, but it is not recommended. Example: Declare Intrinsic Function IsSQLNull,SQLNull,SQLNull#,SQLNull$ Open #1,"(nulls=true)server:database.table" As "MySQL Full-ISAM" ! Display table with possible NULL values Do Try Read Record #1;R. Else Exit Do Print "Name = ";R.CustomerName$ Print "Appointment = "; If IsSQLNull(R.AppointmentDate#) Print "none" Else Print R.AppointmentDate# End If Loop ! Add new record with NULL value R.CustomerName$ = "John Quinn" R.AppointmentDate# = SQLNull#() Add Record #1;R. o The MySQL Full-ISAM driver supports the special MySQL date value of 0000-00-00. Such date values can now be read into date variables and will set the date variable to be "Not-A-Date". The special value of 0000-00-00 can be written by writing a date value of "Not-A-Date". A date variable can be set to "Not-A-Date" by the CLEAR statement ("CLEAR D#"). An error 15 will occur if a "Not-A-Date" value is used in a date function or date expression. o The MySQL Full-ISAM driver reports character fields in indexes as case insensitive when a GET statement retrieves index information (if the MySQL server is using the standard case insensitive character set). When creating a table, the driver will accept index field definitions that are either case sensitive or case insensitive. The actual case sensitivity is always controlled by the MySQL server. o The KILL statement now supports an options field "(...)" before each filename to supply driver options. Example: KILL "(user=fred,password=secret)mytable" AS "MySQL Full-ISAM" The SCOPE/BASIC KILL command does not support deleting MySQL tables. o The Full-ISAM Bridge driver has been extended to support Full-ISAM date fields and translation of field types. A date field is used by specifying a translation function in the field definition that defines how to translate a date value to or from a character or numeric field. Translation functions also support converting Full-ISAM numeric fields to Indexed-Contiguous character key fields. Additional functions support subscripted character fields for key fields or case-insensitive key fields. The translation functions are: DTOC(mask) Convert the Full-ISAM date field to a character string in the record image using "mask". All dates use local date/time. When the DTOC() function is used in an index definition, the "mask" must define a sortable date. For example, "YYMMDD" is a legal index mask, but "MMDDYY" is not because it would not sort correctly. "mask" is a quoted string in which the following substrings have special meaning: YYYY Four digit year YY Two digit year with the century set so it is within 50 years of the current date. AA Two digit year in which years after 1999 are specified as "A0" through "E9". MM Zero filled month, 1 - 12 DD Zero filled day of month, 1 - 31 DDD Zero filled day of year, 1 - 366 DDDDD Zero filled day relative to base year 1968. January 1, 1968 is "00001". Six or more "D"s can be also be used. HH Zero filled hour of day MM Zero filled minute of hour SS Zero filled second of minute DTON(mask) Convert Full-ISAM date field to a decimal number in the record image using "mask". All dates use local date/time. "mask" is a quoted string defining the decimal digits of the number. The following substrings in the mask have special meanings: YYYY Four digit year YY Two digit year with the century set so it is within 50 years of the current date. MM Month, 1 - 12 DD Day of month, 1 - 31 DDD Day of year, 1 - 366 or 0 - 365 DDDDD Day relative to base year 1968. January 1, 1968 is 1. Six or more "D"s can be also be used. HH Hour of day MM Minute of hour SS Second of minute NTOC(mask) Convert Full-ISAM numeric field to a character string according to the USING mask "mask". The mask must use a period (".") for any decimal point point and comma as any grouping separator. NTVNTOC(mask) Convert Full-ISAM numeric field to a character string according to the USING mask "mask" and using locale information to determine the decimal point character. The mask must use a period (".") for any decimal point and comma as any grouping separator. LEFT(len) Use the first "len" characters of the field. This function can only be used in index definitions and the field must also be used in the "[Record]" section. UCASE(len) Use the first "len" characters of the field converted to uppercase. This function can only be used in index definitions and the field must also be used in the "[Record]" section. LCASE(len) Use the first "len" characters of the field converted to lowercase. This function can only be used in index definitions and the field must also be used in the "[Record]" section. Example: Field=LASTPAYMNT,114,2%,DTON("YYDDD") o The Full-ISAM Bridge driver profile has been extended to support two new conversion functions, IFNULL and IFERR, that convert SQL NULL or invalid values to and from the values needed in the emulated indexed contiguous file record. The IFNULL function takes a single string argument which defines a string or number that is stored into the converted field whenever a NULL is read. When a record is written, the same value will be converted to a NULL. Examples: Field=COUNT,28,4%,,,IFNULL("-1") Field=ACCTID,16,12,,,NTOC("-------#.##"),IFNULL("N/A"),Strip In order to read or write NULLs, the SQL driver options in the bridge profile must be set to enable reading and writing nulls (for the MySQL Full-ISAM driver, see the "nulls=true" option described above). The IFERR function is similar to the IFNULL function, but it is applied to invalid numeric or date values. In this release of dL4, the only possible invalid value is the special MySQL date value of "0000-00-00". If no IFERR function is specified, an invalid value results in an error. In the following example, MySQL "0000-00-00" dates are converted to -1 while actual dates are converted to decimal numbers in the form "YYYYMMDD": Field=DATE1N,60,3%,,,DTON("YYYYMMDD"),IFERR("-1") In this example, "0000-00-00" dates in a key part are converted to the string "00000000" while actual dates are converted to strings in the format "YYYYMMDD": KeyPart=DATE1,0,8,"","0123",DTOC("YYYYMMDD"),IFERR("00000000") Both IFNULL and IFERR functions can be used in the same field or key part definition. o The Full-ISAM Bridge driver profile has been extended to support filler fields. A filler field is any record field with a field name beginning with an asterisk. Filler fields are not read from the Full-ISAM file, but they are initialized to the fill character or zeroed if the fill character is not defined. The filler name is treated as a comment. Example: Field=*fillerwithnulls*,54,5 Field=*fillerwithblanks*,59,5,," " o A new option has been added to the Full-ISAM Bridge driver profile to disable use of temporary record values when inserting or modifying records. The temporary values are normally used to reserve key values after SEARCH mode 4 insert statements and thus prevent other programs from inserting the same key. If the new "ProtectKeys=False" option is specified in the initial section of a bridge profile, SEARCH mode 4 statements will check for the current existence of a key value, but the Full-ISAM file will not be modified until all keys have been inserted for the record. This option improves Bridge driver performance and allows use of foreign key constraints in SQL tables. If the option is used, duplicate key errors may occur after a successful SEARCH mode 4 insertion of the key. Bridge profile example: [FullISAMBridge] File=filename OpenAs=FoxPro Full-ISAM ProtectKeys=False o The Full-ISAM Bridge driver support of SEARCH mode 6 (search less than) has been improved. Statements such as SEARCH #Chan,6,IdxNum;"{",R,S can now be used on indexes that use date or numeric conversion functions. The driver will detect that the key value is greater than any possible key value and will search for the last key in the specified index. In the previous release, the key value "{" would have caused an error in the conversion function because "{" is an illegal value. o The numeric precision syntax in Full-ISAM Bridge profile files has been extended to specify the number of decimal places needed. The new, optional format is "p.d%" where "p" is the dL4 numeric precision (1-4) and "d" is the number of decimal places. Thus "3.2%" would specify a 10 digit floating point format with two decimal places. The decimal place information is used by the tools/ic2fi utility to create Full-ISAM files when the Full-ISAM driver supports only fixed point, rather than floating point, numbers. Example: Field=COST,80,3.2% o The tools/ictofi utility program has been replaced with a new utility, tools/ic2fi, that offers similar, but greatly improved, features to convert from Indexed-Contiguous files to Full-ISAM files. The new utility can also be CALLed as a subprogram to perform automated or repetitive conversion of Indexed-Contiguous files. The ic2fi utility is documented in the dL4 5.2 Product Training manual which can be downloaded from www.unibasic.com or ftp.dynamic.com. o The tools/buildfi utility program has been enhanced to allow selection of the Full-ISAM type (FoxPro or SQL) and to improve error handling. o A new driver, "Socket Text", has been added to provide text line oriented I/O to TCP sockets. Driver arguments and usage is identical to the raw socket driver except that READ and INPUT statements will read data in lines terminated by carriage return and/or line feed. o A new open option, "SYNC", has been added to the Portable Contiguous, Portable Indexed-Contiguous, and text file drivers. This option forces the operating system to write data immediately to disk. Example: Open #1,"(sync)datafile" This option will severely impact file throughput and should only be used in special circumstances. o A new option, "buffer=true", has been added to the text and pipe drivers to improve performance. For compatibility with UniBasic, these drivers normally output data immediately after a PRINT or WRITE statement. The "buffer=true" option instructs the drivers to delay output until an internal buffer is filled or the driver is closed. The option can be used in an OPEN statement or in a printer script "# dl4opts=" line. Examples: BUILD #1,+"(buffer=true)textfile!" # dl4opts=buffer=true o Portable Indexed-Contiguous and Portable Contiguous file performance has been improved for files opened in exclusive mode. Scratch files should be opened using the EOPEN statement to obtain this increased performance. o It is now possible to output binary zero characters to a terminal or serial port when in binary output mode. The MAT WRITE statement will output all characters including binary zero characters in a string variable. Subscripts can be used to limit output to a selected range within a string. o A new BASIC command, XBREAK, has been implemented to allow the user to set breakpoints outside of the current program. The command uses the same syntax as the existing BREAK command, but will apply the breakpoint to both the current program and to any program entered via CHAIN, CALL subprogram, or SWAP statements. Example: XBREAK 1000 XBREAK breakpoints can be deleted or listed with the normal NOBREAK or STATUS BREAKPOINT commands. o Enhancement: quoted values can now be used in driver options. For example, a quoted value might be used to provide a subject line using parentheses to the email driver: Open #1,"(From=someone,Subject=''(test)'')somebody" As "Email" o Behavior change: the DL4PORTDUMP and DL4STOPDUMP runtime parameters have been enhanced to support an optional file protection ("") specification. o Behavior change: the LOADSAVE utility now prints a simple usage message if the "-h" option is used. A full usage message can be displayed by using the "-H" option. o The PORT statement has been extended with a new mode, 6, to determine whether a port is blocked by a record lock and which other port is holding the needed record lock. The statement PORT portnum,6,status,isblocked,blockingport sets the variable "isblocked" to one if the dL4 program running on port "portnum" has been waiting for over 20 seconds for a record lock and to zero if it is not blocked. If the port is blocked by a record lock, the variable "blockingport" is set to the port number of the program that currently has the record locked or to -1 if the blocking port number cannot be determined. PORT mode 6 is supported for record locks on formatted, contiguous, and indexed contiguous files. o The PORT statement has been extended with a new mode, 7, to return the user name and work station name of a specified port. The statement PORT portnum,7,status,userid$,station$ queries port "portnum" and returns in "userid$" the user name, if any, associated with the port and returns in "station$" the terminal name, if any, used by the port. o The TERM utility has been extended to display the user name and work station name associated with each port. If the program running on a port is currently blocked by a record lock wait, its state will be displayed as "Blkd" and the port number that is currently holding the locked record will be displayed in parentheses. The "Blkd" state information is supported only for record locks on formatted, contiguous, and indexed contiguous files. o The intrinsic CALLs GetGlobals() and SetGlobals() have been extended to support separate named sets of global values. If the first parameter of CALL GetGlobals() or CALL SetGlobals() is a string, it will be treated as a global set name and the get or set operations will be applied using that global set. The default set is named "". A global set is created by the first CALL SetGlobals() using the set name. Examples: Call SetGlobals$("mylib",0,N$,A) ! set values in "mylib" Call GetGlobals$("mylib",0,N$,A) ! get values from "mylib" Call SetGlobals("mylib") ! delete the set "mylib" o The intrinsic CALL table in the dL4 development kit, userproc.c, now supports the option USERPROCOPT_CVTSTRINGS to automatically string parameters to and from binary ITEMS using the UniBasic IRIS character set. This option can be used to simplify conversion of CALLs from UniBasic at the cost of some additional overhead. See the files usercall/userproc.h and usercall/userproc.c in the development kit for details. o Bug fixed: the SPAWN statement sometimes failed when a program path included embedded spaces. o Bug fixed: printing to the auxiliary printer to the "Windows Terminal Printer" driver sometimes produced garbled output. o Bug fixed: when the main window was taller than the display window, the frame around the display window was sometimes displayed incorrectly. o Bug fixed: searching or reading backwards through an index in the MySQL Full-ISAM driver skipped records that had keys beginning with NULL values. o Bug fixed: the statement "ENTER ..." always generated an illegal word error. o Bug fixed: storing a value into a "%2" (32-bit integer) structure member caused alignment violations on some systems (such as Sun SPARC systems). o Bug fixed: the POS() function did not work correctly when a negative step value was used with the "IS" or "EXCEPT" relational operators. o Bug fixed: OPTION DIALECT IRIS1/BITS1/IMS did not allow values to be returned in subscripted strings parameters of intrinsic CALLs or functions. o Beta bug fixed: memory violations occurred if auto-increment columns or null values were used in MySQL tables. o Beta bug fixed: MySQL indexes were not recognized as case-insensitive. o Bug fixed: when converting source files, functions in CALL arguments were sometimes converted to variables. o Bug fixed: binary output did not work on Windows 95/98/ME systems if the printer used direct printing rather than spooling. o Bug fixed: if a printer script used the "TRANSLATE=" option and did not use the "PATH=" option, a "File not found" error sometimes caused a memory violation. o Beta bug fixed: colors were set incorrectly by 'FONTCOLOR' or 'BACKCOLOR' when used in a GUI list box such as 'WCLIST'. o Beta bug fixed: the final item in a GUI list box (such as 'WCLIST') was sometimes displayed with an incorrect value whenever the list box items were initialized. o Beta bug fixed: hidden fields did not work in GUI list boxes such as 'WCLIST'. o Bug fixed: opening the pipe driver with an AS clause sometimes resulted in a syntax error. o Bug fixed: a BUILD statement with an AS clause using "" or "AutoSelect", caused a memory violation. o Bug fixed: POS() expressions without relational operators were not treated as syntax errors. o Bug fixed: when using DynamicXport, HTML files with long lines (499 characters or more) did not work correctly. o Bug fixed: when using DynamicXport, "dl4l()" references did not work correctly if the list variable was empty. o Bug fixed: if a WCGROUP with radio buttons was enclosed within another WCGROUP, the first button would be placed in a separate radio group apart from the other radio buttons. Jan 6 2003 (Maintenance Release 5.1.5) o A new environment variable, DXTESTCOPY, has been implemented for use in debugging DynamicXport applications. When the DXTESTOUT environment variable is defined, a "CALL DXCLOSE()" statement outputs the current DynamicXport output table to the text file selected by DXTESTOUT. The DXTESTCOPY value, if defined, selects which, if any, values from the DynamicXport input table should be copied to that text file. If a selected value exists in both the input and output tables, only the output table value will be written to the text file. DXTESTCOPY is a comma separated list of value names or value name prefixes as in the optional CALL DXCOPY() or CALL DXMOVE() selection arrays. Examples: To copy all input table variables with names beginning with "U_" DXTESTCOPY=U_ export DXTESTCOPY To copy all input table variables DXTESTCOPY=+ export DXTESTCOPY o Bug fixed: a memory violation sometimes occurred after an error 15, "arithmetic overflow", was detected in the argument list of a user defined function or procedure. o Bug fixed: if a program executed a SWAP statement using CHAIN WRITE statements, then any subsequent CHAIN or SWAP statement in the parent program would not pass common ("COM 3%,N") variables. o Bug fixed: when converting programs using the CONVERT command or the LOADSAVE "-c" option, intrinsic functions in CALL parameters were sometimes converted to array variable references. o Bug fixed: POS() expressions without relational operators were not treated as syntax errors. o Bug fixed: if a WCGROUP with radio buttons was enclosed within another WCGROUP, the first button would be placed in a separate radio group apart from the other radio buttons. o Bug fixed: binary output did not work on Windows 95/98/ME systems if the printer used direct printing rather than spooling. o Bug fixed: if a printer script used the "TRANSLATE=" option and did not use the "PATH=" option, a "File not found" error sometimes caused a memory violation. o Bug fixed: opening the pipe driver with an AS clause sometimes resulted in a syntax error. o Bug fixed: a BUILD statement with an AS clause using "" or "AutoSelect", caused a memory violation. o Bug fixed: when using DynamicXport, HTML files with long lines (499 characters or more) did not work correctly. o Bug fixed: when using DynamicXport, "dl4l()" references did not work correctly if the list variable was empty. o Bug fixed: the 'EPW' mnemonic could not be defined in terminal definition files. o Bug fixed: in SCOPEC.EXE and RUNC.EXE, an error 5 ("Illegal character") occurred whenever the 'BCTRACK' ("Begin Cursor Tracking") mnemonic was used and a window was open or the window system was active. Sep 27 2002 (Maintenance Release 5.1.4) o The intrinsic CALL FindF() now accepts an optional third argument, a string variable, to receive the absolute path of a file if it exists. Examples: Call FindF(Filename$,Status) Call FindF(Filename$,Status,ActualPathFound$) o Two new intrinsic functions have been implemented to convert binary variables to and from base-64 character strings. Example: Declare Intrinsic Function Base64$, Base64? String$ = Base64$(BinaryVariable?) Binary? = Base64?(StringVariable$) o Bug fixed: if a key in a SEARCH statement was specified with a subscripted string variable ("SEARCH #1,3,1;K$[1,10],R,S") and a key was successfully found, the new key value was not returned. o Bug fixed: the "mixedcase" option in the LUMAP and DL4LUST runtime parameters did not work and caused a syntax error. o Bug fixed: using double directory separators ("abc//def") in a path sometimes caused the MSC$(8xx) function to return an incorrect path. Sep 6 2002 (Maintenance Release 5.1.3) o Bug fixed: the 'CS' mnemonic and the WINDOW CLEAR statement cleared GUI menu elements. Sep 4 2002 (Maintenance Release 5.1.2) o A new mnemonic, 'DEFAULTCOLOR', has been defined to set the default colors to the current foreground and background colors for the rest of the session. o Enhancement: up to 128 GUI elements can now be queried at one time using one or more WCQUERY mnemonics (previously only 32 elements could be queried before reading the results). o Bug fixed: 'WCLISTDROP' elements whose drop down boxes extended below the bottom of the window could not be deleted by the 'CS' mnemonic. o Bug fixed: the DIR utility reported an illegal subscript error when it listed a FoxPro Full-ISAM file. o Bug fixed: opening the pipe driver with an AS clause sometimes caused a file syntax error. Jul 19 2002 (Maintenance Release 5.1.1) o Behavior change: CALL MEMCOPY() now allows copy sizes that exceed the size of the destination variable if that variable is an element of a larger array or structure variable and the size is within the size of the surrounding variable. For example, it is possible to copy to multiple elements of an array starting at a specific subscript. o Behavior change: CALL IMSMEMCOPY() now prevents copying beyond the limits of the destination variable. If the destination variable is an array element or structure member, the limit is based on the entire array or structure variable. For example, it is possible to copy to multiple elements of an array starting at a specific subscript, but an attempt to copy beyond the end of the array will cause an error 38. o Bug fixed: dL4 5.1 could not be used with dynamicXport. Jul 10 2002 (Release 5.1) o A new runtime parameter, DL4LUST, has been implemented to provide a UniBasic LUST-like search path for data files. Like LIBSTRING and other dL4 path lists, DL4LUST is a space separated list of directories. If DL4LUST is defined and a file is opened or created with a relative path, dL4 will search each directory in the list and use the first directory in which the file is found as the root directory of the file. If the file is being created and the file does not exist in any of the directories, then the file will be created using the first directory in the list. If the runtime parameter DL4DEFLU is defined, then the search will modified to try each of the directories in DL4LUST first without and then with the value of DL4DEFLU appended. Example: Assume DL4LUST is equal to ". /usr/data test" DL4DEFLU is equal to "5" the current directory is "/home/fred/" then the statement OPEN #1,"file" would try to open "file" using the following paths and in the following order: ./file ./5/file /usr/data/file /usr/data/5/file /home/fred/test/file /home/fred/test/5/file The DL4LUST and LUMAP runtime parameters can both be defined and LUMAP mapping will be used instead of DL4LUST if an LUMAP mapping is found. In choosing between using DL4LUST and LUMAP, the UniBasic compatibility of DL4LUST should be weighed against the higher efficiency of LUMAP. In a networked file system environment, using LUMAP will avoid the high overhead of multiple directory searches over the network. o The LUMAP and DL4LUST runtime parameters can now accept filename options to control the legal character set for filenames and paths. The options are specified in parentheses at the beginning of the LUMAP or DL4LUST parameter string. The following options are recognized: "mixedcase" - do not convert the filename to lowercase (Unix) or uppercase (Windows) "unibasic" - limit the filename to letters, digits, "-", and ".". Ignore any character at and following an illegal character. "pfchar=x" - limit the filename as described for "unibasic" but convert the first "@" character to "x" and then ignore any following characters. If both LUMAP and DL4LUST are used, only one parameter string to specify the options or both strings must specify the same options. These options have no effect on absolute paths which are always used as given. o The LUMAP and DL4LUST runtime parameters can now accept a "case=" option to control case conversion in relative paths. By default, dL4 for Unix converts relative paths to lowercase Unix filenames when creating or opening files. Similarly, it converts lowercase Unix filenames to uppercase when CHF$(8xx) or other functions are used to retrieve the filename open on a channel. The "case=" option is specified in parentheses at the beginning of the LUMAP or DL4LUST parameter string. The values "" and "" in the "case=" argument must be replaced by the desired operating system ("") and user ("") case conversion: "l" - Convert to lowercase "u" - Convert to uppercase "a" - Leave case unchanged For example, an LUMAP value of "(case=la)" would perform the normal conversion of relative filenames to lowercase when creating or opening files, but it would always return the actual case of filenames in the CHF$(8xx) function. o The LUMAP and DL4LUST runtime parameters now support a "CHARSET=name" option to select the file system character set under Unix. The character set name must be either "ASCII", "US-ASCII", "ANSI", "ISO 8859-1", or "Windows". Example: LUMAP="(charset=ISO 8859-1)" export LUMAP The option can be set with or without setting a path mapping or search list. o The UniBasic utilities listed below have been converted to dL4. These are essentially the original UniBasic utilities loaded into dL4 using conversion profiles. The user interface and functionality are identical to that of the original UniBasic utilities. batch Execute commands on a phantom port bitsdir List directory contents change Change filename or attributes copy Copy files dokey Access or modify Indexed-Contiguous files format Create Formatted files keymaint Access or modify Indexed-Contiguous files libr List directory contents make Create files makecmnd Generate command files for BATCH or EXEC mfdel Delete files port Display port status or evict ports (the "term" utility is a native dL4 program that offers similar functions and extended dL4 options) scan Display file information who Display user information o The following intrinsic calls have been added for UniBasic compatibility: UniBasic CALL New equivalent dL4 Intrinsic CALL $ATOE Call AToE() CALL $CKSUM Call Cksum() CALL $CLU Call CLU() CALL $DATE Call Date() CALL $DEVOPEN Call DevOpen() CALL $DEVCLOSE Call DevClose() CALL $DEVREAD Call DevRead() CALL $DEVWRITE Call DevWrite() CALL $DEVPRINT Call DevPrint() CALL $ETOA Call EToA() CALL $LOCK Call Lock() CALL $MEMCMP Call MemCmp() CALL $RDFHD (97) Call Rdfhd() CALL $VOLLINK (91) Call VolLink() CALL 1 Call StrSrch1() CALL 5 Call MemCopy() CALL 7 Call SetEcho() CALL 15 Call PkUnPkDec() CALL 18 Call PkRdx5018() CALL 19 Call UnPkRdx5019() CALL 20 Call PkDec20() CALL 21 Call UnPkDec21() CALL 29 Call EditField() CALL 30 Call CopyStr() CALL 40 Call InitErrMsg() CALL 44 Call StrSrch44() CALL 45 Call PkDec45() CALL 46 Call UnPkDec46() CALL 47 Call Misc47() CALL 48 Call PkRdx5048() CALL 49 Call UnPkRdx5049() CALL 53 Call ASC2EBCDIC() CALL 57 Call ClearStr() CALL 72 Call Gather() CALL 73 Call Scatter() CALL 81 Call StrSrch81() CALL 95 Call IRISOS95() CALL 116 Call CloseAll() CALL 117 Call AvailBlks() CALL 118 Call NextAvPort() CALL 127 Call FileInfo() In order to use these intrinsic CALLs, a DECLARE INTRINSIC SUB statement must be used to declare the intrinsic SUB. A DECLARE statement will be added automatically when programs are converted using a conversion profile. o UniBasic CALL $MONITOR has been added to tools/oldcalls.lib, a dL4 library. This is a partial implementation that does not support returning the full list of open channels. The implementation is sufficient to support user status displays and it is used by the converted UniBasic PORT utility in the tools/ directory. o A new intrinsic function, ErrMsg$(), has been implemented to replace references to the UniBasic ERM() function. The ErrMsg$() function is used with CALL InitErrMsg() to replace the error message facility provided by UniBasic ERM() function and CALL 40. The standard conversion profile will convert ERM() function usage to ErrMsg$() and add the required DECLARE INTRINSIC FUNCTION statement. o A new intrinsic function, UBMem(), has been implemented to satisfy references to the UniBasic MEM() function. Like the UniBasic MEM() function, UBMem() always returns zero. The standard conversion profile will convert MEM() function usage to UBMem() and add the required DECLARE INTRINSIC FUNCTION statement. o The intrinsic CALL BitsNumStr() has been extended to accept string variables as well as binary variables as arguments. This enhancement makes the BitsNumStr() compatible with UniBasic CALL 2. o A new utility, dl4servr.exe, is now included with dL4 for Windows. This utility installs and implements a service to connect dL4 programs with incoming network TCP connections on a specified IP address and port number. This function is similar to that of "inetd" on Unix systems. The utility is a command line program with the following command line syntax: dl4servr install servicename address port command options dl4servr remove servicename dl4servr help The format "dl4servr install servicename address port command options" installs the dL4Servr service using "servicename" as the service name, listening to the TCP "address" and "port", and running "command" whenever a TCP connection is received. A typical value of "command" would be "C:\Progra~1\dl4\runc.exe C:\AppDir\app.dl4" where app.dl4 is a dL4 program to run with standard input and output assigned to the incoming TCP socket connection. The following options are accepted: /d directory initial current directory used by "command" /e envvars environment variable settings for "command" using the format "name=value" and comma separators between settings /u username user name for the account running the service /p password password for the account running the service The current path of dl4servr.exe is used as the installation location. The service will be started whenever the system is rebooted or the command "net start servicename" is executed. The format "dl4servr remove servicename" removes the dl4servr service named "servicename" The format "dl4servr help" displays help text o The 'n,m WCENABLE' and 'n,m WCDISABLE' mnemonics can now be used to enable or disable all GUI elements between "n" and "m" inclusive. o A new mnemonic, 'RESETFONT', has been defined to restore the default screen or printer font name and size. o A horizontal scroll bar is now automatically displayed by WCLIST boxes if the list elements are too wide for the list box. o The Windows Page Printer driver now tries to match the requested line height even when the system printer driver cannot provide the requested font height. o The Microsoft SQL Server Full-ISAM driver can now be opened with an "AS" clause using the name "MSSQL Full-ISAM" or "SQL Full-ISAM". The driver name "SQL Full-ISAM" selects the preferred SQL Full-ISAM driver which, in a custom configuration, may or may not be the Microsoft SQL Server driver. o A new option, "OPTION DEFAULT ARGUMENT CHECKING IS WEAK", has been added to support passing array variables to subprograms (CALL by filename) without using the empty bracket notation ('CALL "pgm",A[]'). This option improves compatibility with IMS BASIC. o A new optional setting has been defined for conversion profiles to convert references to undefined user functions ("FNx"). Without this option, undefined functions are treated as compile time errors and the program cannot be executed until the error is corrected. When enabled, the option adds definitions for each undefined function to the end of the program. The functions will generate an error 30 if used. Using the option the following program 10 Def Fna(x) = x + 5 20 Print Fna(3) + Fnb(4) would be converted to 1 Declare Function Fnb, Fnc 10 Def Fna(X) = X + 5 20 Print Fna(3) + Fnb(4) + Fnc(8) 1000 ! Dummy functions inserted for referenced, but undefined, functions 1001 External Function UndefinedFunctionError() 1002 Error 30 1003 End Function 0 1004 Def Fnb(X) = UndefinedFunctionError() 1005 Def Fnc(X) = UndefinedFunctionError() The line numbers used by the inserted lines are always greater than any line number used in the program. The option is enabled by adding a "ConvertUndefinedFunctions=True" line in the conversion profile settings section. Example: [Settings] ConvertUndefinedFunctions=True o A new intrinsic CALL, IMSMEMCOPY(), has been implemented to provide compatibility with CALL 90 in IMS BASIC. The syntax of CALL IMSMEMCOPY() is: Call IMSMemCopy(Destination, Source, ByteCount) where "Destination" is a variable of any type, "Source" is a variable of any type, and "ByteCount" is a numeric variable or expression. The CALL copies "ByteCount" bytes from the "Source" variable to the "Destination" Variable. If both "Destination" and "Source" are string variables or arrays, then "ByteCount" characters are copied. This CALL is dangerous and will corrupt memory if "ByteCount" exceeds the size of the destination variable. This is allowed so that "Destination" variable can be a subscripted array element identifying the start of a copy range. o A new intrinsic CALL, CHSTAT(), has been implemented to return current SWAP level information. The BASIC syntax of the CALL has several possible parameter lists: Call ChStat(SwapLevel, ParentLineNum, ParentName$) Call ChStat(SwapLevel, ParentName$, ParentLineNum) Call ChStat(SwapLevel, ParentName$) Call ChStat(ParentName$, SwapLevel, ParentLineNum) Call ChStat(ParentName$, SwapLevel) Call ChStat(ParentName$) Call ChStat(SwapLevel, ParentLineNum) Call ChStat(SwapLevel) where "SwapLevel" receives the current SWAP level number (zero if there are no SWAPs in progress), "ParentLineNum" receives the line number of the SWAP statement in the parent program (zero if none), and "ParentName$" receives the name of the parent program ("" if none). o A new intrinsic CALL, CALLSTAT(), has been implemented to return current CALL-by-filename level information. The BASIC syntax of the CALL has several possible parameter lists: Call CallStat(CallLevel, ParentLineNum, ParentName$) Call CallStat(CallLevel, ParentName$, ParentLineNum) Call CallStat(CallLevel, ParentName$) Call CallStat(ParentName$, CallLevel, ParentLineNum) Call CallStat(ParentName$, CallLevel) Call CallStat(ParentName$) Call CallStat(CallLevel, ParentLineNum) Call CallStat(CallLevel) where "CallLevel" receives the current CALL-by-filename level number (zero if there are no CALLs-by-filename in progress), "ParentLineNum" receives the line number of the CALL statement in the parent program (zero if none), and "ParentName$" receives the name of the parent program ("" if none). o A new intrinsic function, CRC16(), has been implemented to calculate 16 bit CRC values. BASIC syntax: x = CRC16(mode, polynomial, string, oldcrc) where: "mode = 0" - calculate 8-bit sum of lower 8 bits of each character "mode = 1" - calculate CRC using lower 8 bits of each character An XMODEM compatible CRC can be calculated using mode one, a polynomial value of 4129 (0x1021), and an initial CRC of zero. o A new statement, CHAIN READ IF, has been added to perform a CHAIN READ of specified variables, but without reporting an error if any of the variables weren't passed by CHAIN WRITE statements. Example: CHAIN READ IF SubTotal, Filename$ o A new option, "OPTION DIALECT IMS", has implemented to select IMS BASIC compatible behavior. That behavior is identical to "OPTION DIALECT IRIS1" except for USING mask behavior where a positive value is allowed to use all characters for digits. For example, the mask "--#.##" normally would generate an overflow result for 123.45, but outputs "123.45" with "OPTION DIALECT IMS". o Behavior change: "OPTION DIALECT IRIS1", "OPTION DIALECT BITS1", and "OPTION DIALECT IMS" now allow intrinsic CALLs and functions to return values in parameters even when the parameter is a subscripted string. This change improves compatibility with UniBasic and IMS BASIC. o The "Data=XXX" open option to set serial line character size, parity, and stop bits has been extended to accept a question mark ("?") in place of the character size, parity, or number of stop bits. If "?" is used, then the existing value of that parameter will be left unchanged. Thus the option "Data=8?1" sets the character size to eight bits and the number of stop bits to one, but leaves the parity option unchanged. A new parity option, "P", has been defined to enable parity using the current even or odd parity setting. o To support conversion of IMS BASIC indexed contiguous files, a key translation feature has been added to dL4 Portable/Universal indexed contiguous files. The feature supports translating two digit years between "00" and "39" in keys to the values "An" through "Dn". This translation causes the keys for years 2000 - 2039 to be sorted correctly. An application using the file will only see numeric dates. The translation is defined for a file by using the statement Set #chan,-599;IndexNum,MapNum,Offset,Size where "IndexNum" is the index containing the keys to be translated, "MapNum" is the mapping function number (only function zero is supported), "Offset" is the zero based byte offset of the year in the key, and "Size" is the length of the key field in characters. The translation definition is stored in the file header and will be used by any subsequent open of the file. Key translation can be disabled on an open file by the statement "Set #chan,-599,0;" and re-enabled by the statement "Set #chan,-599,1;". The dL4 QUERY utility (tools/query) has been extended to display the translation option, if any, used by an index. o A new runtime parameter, "MINPORT", has been defined to set the minimum port number to be used when automatically generating a port number. o A new option, "-k seconds", has been added to the "run" utility to specify a socket "keepalive" timeout period for the standard input channel. This option can be used when using "run" to execute dL4 programs connected to a socket. The timeout option causes an error when reading from the socket if the remote system crashes, is rebooted, or loses its network connection. o The statement "GET #c,-399;S$" can be used to retrieve the index character set from an indexed contiguous or Full-ISAM file. o The terminal type number of the dL4Term character window terminal definition ("term/dl4term.chwin") has been changed to 409 to distinguish it from the standard dL4Term terminal definition (which uses 410). The number of lines has been changed to 25 (the default value for dL4Term). The number of columns is now updated when a 'NR' or 'WD' mnemonic is processed. o A new function, CHR?(n), has been implemented to convert numbers to binary variable bytes. o An error is now reported if a READ or RDLOCK statement contains a constant or expression in the argument list. For example, the statement 'READ #5;"abcdef"' is no longer legal. o Semicolons are now converted to commas in MAT WRITE statements when converting programs. o The raw file driver has been extended to write an entire string value, including zero bytes or characters, when a MAT WRITE statement is used. o A new MSC$() function, MSC$(-2), has been implemented to returned the dL4 revision number in the format RRLLBBSS. Another new MSC$() function, MSC$(-3), has been implemented to return the dL4 revision string. o The "run" and "loadsave" utilities now accept a "-V" option to print the dL4 revision and exit. o RmvSpaces(), WhoLock(), and the DynamicXport CALLs used in UniBasic have been added to the standard conversion profiles ("tools/convert.prf" and "tools/convbits.prf"). o The "Serial Terminal" and "Terminal Window" drivers now support output of zero bytes in binary output mode. o A new channel function, CHF(1500 + c), has been implemented to return the number of characters read by the last I/O operation. This channel function can be used when performing binary input from serial ports or sockets. o The intrinsic CALLs SETGLOBALS() and GETGLOBALS() now support up to 1000 items (the previous default limit was 30). o A new MEMBER statement option has been added to specify variable length fields. The VARLEN option can be used with FoxPro Full-ISAM files to create memo fields instead of fixed length character fields. Example: Def Struct REC Member Name$[32] : Item "Name" Member 3%,Price : Item "Price" Member Comment$[100] : Item "Comment" : Varlen End Def The QUERY utility in the Tools/ directory displays variable length fields with a "V" attribute. o The DUPLICATE, KILL, and MODIFY statements now accept an option AS clause to specify the driver name or class. The AS clause is used with drivers that cannot be autoselected such as future SQL drivers. o The TERM utility in the Tools/ directory now has a DUMP option to request a program dump on a specified port. The DUMP option can only be used if the specified port has the DL4PORTDUMP environment variable defined to specify the dump file location. Example: #term 5 dump o The CHECKSUM utility in the Tools/ directory now has a "-c checksum" option to calculate a file checksum and compare the result to an expected value. o The QUERY utility in the Tools directory now displays the creation, last accessed, and last modified date/times of the specified file if those values are available. Because Unix does not maintain a creation date, the displayed creation date/time will simply be the earliest of the record date/time values. o Behavior change: the maximum repeat count for a character (such as 'n PI') is now limited to 32767 to avoid runaway printing. o The translation of strings when reading from or writing to UniBasic or Universal files has been changed to support intrinsic CALLs that pack into or unpack data from strings. The new translation effects non-ASCII values which were previously translated to dL4 mnemonic codes. The new method translates any character in the mnemonic range to a special Unicode range of 0xf780 to 0xf7ff. This translation preserves the eight bit value of the translated characters allowing intrinsic packing CALLs to simply ignore the upper eight bits of the Unicode character. If characters in this special range are printed to a terminal or printer driver, the characters will be translated to actual dL4 mnemonic codes at output time. When writing to a UniBasic or Universal file, the special translation range, the standard dL4 mnemonics, and any Unicode character between 0x0080 and 0x00ff will all be translated to mnemonic character values. The purpose of this change is to ease conversion from UniBasic to dL4 by allowing access to files that contain packed data. The change will not be visible to existing dL4 applications if they simply read mnemonic values from file and print the values to a terminal, a printer, or another file. The change will be visible if the application examines the actual character values. For example, if an application reads mnemonic strings from a file and then compares the characters to dL4 mnemonics ('IF A$[I,I] = 'CS'), the characters will never be equal to the expected mnemonic characters. If your existing dL4 application depends on this type of behavior, please contact Dynamic Concepts. o The conversion profile format has been extended to automatically append "[]" to intrinsic CALL array parameters when a program is converted. For each intrinsic CALL that has array parameters, a prototype parameter list must be added to the conversion profile. For example, the following entry in the "[Intrinsic]" section of the standard tools/convert.prf file specifies that the second and the optional fifth parameters are arrays: FileInfo=127(Dir$,Info[],Filename$,Mode,DirInfo[]) Note that "[]" has been placed after each array parameter to inform dL4 that brackets should be added to these parameters during conversion. Using this information, the line CALL 127,D$,A,A$,1,T would be converted to Call FileInfo(D$,A[],A$,1,T[]) In this release, the types and names of the parameters in the conversion profile are not used during conversion and they do not need to match actual usage. o A new optional section, "[CallByFilename]", has been added to conversion profiles to append "[]" to each array parameter in a CALL-by-filename or in the ENTER statements of a subprogram that uses array parameters. This feature is used to convert from IMS BASIC and it is not needed when converting from UniBasic, IRIS, or BITS BASIC. For each subprogram that uses array parameters, an entry as shown below should be added to the "[CallByFilename]" section: [CallByFilename]" PrintReport="PrintReport"(A,B,C[],D) The example above would add "[]" to the third parameter of CALL "PrintReport" statement in each converted program. It would also add "[]" to the third parameter of the ENTER statement in "PrintReport" when converting that subprogram. The quoted filename in the conversion profile is case insensitive, but it must otherwise match the filename used in CALL statements. Synonyms may be added after the first filename for alternative forms. Example: PrintReport="PrintReport"(A,B,C[],D),"1/PrintReport" o When converting programs using "LOADSAVE -C" or the SCOPE CONVERT command, DECLARE statements are now added for DEF FN functions that are used prior to their declaration. The inserted DECLARE statements eliminates compile time errors that would otherwise be reported and allows the converted program to run. o When converting programs using "LOADSAVE -C" or the SCOPE CONVERT command, "CHF(e)" functions will be converted to "CHF$(e)" if "e" contains a constant between 800 and 899. o A new boolean parameter, "ConvertCHF800To1300", has been added to the "[Settings]" section of the conversion profile. If set to "TRUE", "CHF(8xx)" function calls in the source program will be converted to "CHF$(13xx)" function calls which return the native absolute path. o A new optional setting has been defined for conversion profiles to convert references to undefined line numbers to labels and then add labeled statements at the end of the program. Using this option the following program 10 Print "Hello" \ Goto 30 20 Goto 1000 30 Print " world" would be converted to 10 Print "Hello" \ Goto 30 20 Goto U01000 30 Print " world" 1000 End ! Labels inserted for non-existent lines/labels 1001 U01000: Error 6 The line numbers used by the inserted labels are always greater than any line number used in the program. The option is enabled by adding a "ConvertUndefinedLineRefs=True" line in the conversion profile settings section. Example: [Settings] ConvertUndefinedLineRefs=True o A new optional setting has been defined for conversion profiles to renumber programs when they are converted. This option can be used when converting programs that need to have DECLARE INTRINSIC SUB and other statements inserted prior to the first line of program, but the first line has a line number of one. The following example would renumber a converted program to start at line 100 and increment by 10 for all following lines: [Settings] Renumber=100,10 o A new optional setting has been defined for conversion profiles to report each occurrence of a undefined intrinsic CALL as an error. [Settings] ReportUndefProcs=True o If "Language=BITS" is specified in the "[Settings]" section of the conversion profile, "IF ERR 0" statements will be converted to "IF ERR(0)" statements. o If "Language=BITS" is specified in the "[Settings]" section of the conversion profile, "CHR(x)" will be converted to "CHR$(x)" in converted programs. o A new optional section, "[Edit]", has been added to conversion profiles to support user defined source editing that will be applied to each source line when a program source file is converted. The feature is available from both the LOADSAVE "-c profile" option and the SCOPE CONVERT command. The entries in the "[Edit]" section consist of pairs of lines where the first line defines what is to be replaced and the second line defines the new text. For example, if a conversion profile included the lines [Edit] OldText=Hello New=GoodBye then each occurrence of "Hello" in a source line would be replaced with "GoodBye". The keyword in the first line defines how the search will be performed: OldText= finds and replaces each exact match of the specified text OldTextCI= finds and replaces each case-insensitive match of the specified text OldTokens= finds and replaces each matching token string ignoring case and whitespace. It will NOT change text in string literals, mnemonic literals, DATA statements, or comments. A number in the text will match any equivalent numeric value ("1.3 will match with "1.30"). Because case and whitespace are ignored, the text "A + B" would match "a + b", "A+B", "A+b", and several other forms. Because this a token oriented search, "A + B" would not match "A + B1". OldString= finds and replaces each exact match of the specified text within a string literal ("abc") other than those in DATA statements OldMnemonic= finds and replaces each case-insensitive match of the specified text within a mnemonic literal ('CS BD') OldData= finds and replaces each exact match of the specified text in a DATA statement OldComment= finds and replaces each exact match of the specified text in a comment (! or REM) The keyword value is case insensitive in both the "old" and "new" lines. Example: [Edit] oldtokens=@0,23; new=@0,Msc(34); o A new option, "-w", has been added to the LOADSAVE utility to enable warning messages for non-fatal errors. In this release, warning messages are produced for string variables without corresponding DIM statements. o A new option, "-L", has been added to the LOADSAVE utility to convert all line number references to labels. Each generated label has the form "Lnnn" where "nnn" is the original line number. o The SCOPE CONVERT command and the LOADSAVE "-c" convert option will now convert DATA statements by making each DATA value a quoted string. The READ statement has been enhanced to allow READing a DATA string value into a numeric value. o Conversion of DATA statements in IMS BASIC programs has been improved to accept end of line comments. This feature requires using a conversion profile with a "Language=IMS" setting. o The SCOPE CONVERT command and the LOADSAVE "-c" convert option will now accept PEEK, POKE, SECTOR, and TAPE statements, which do nothing in UniBasic, and convert the statements to PAUSE NOT("Original statement text") which does nothing in dL4. o The SCOPE CONVERT command and the LOADSAVE "-c" convert option will now accept and convert semicolons used instead of commas in READ or WRITE statements. For example, the line 10 READ #1,R;A,B;C,D; is converted to 10 Read #1,R;A,B,C,D; o The SCOPE CONVERT command and the LOADSAVE "-c" convert option will now convert extra statements after an IF ERR 0 statement to comments. This produces behavior similar to UniBasic where extra statements are ignored and never executed. For example, the line IF ERR 0 LET N = 1 \ PRINT "Hello" is converted to IF ERR 0 LET N = 1 ! PRINT "Hello" This conversion is not applied if the conversion language is IMS. o A new runtime parameter, DL4DRIVERS, has been defined to configure dL4 driver selection. There are currently two DL4DRIVERS options, "Universal" and "ANSI Text". Setting DL4DRIVERS to "Universal" causes dL4 to create Universal Indexed-Contiguous or Formatted files by default instead of Portable Indexed-Contiguous or Formatted files. This can be useful if the files need to accessed by UniBasic or if mnemonics are to be stored in the files (note that only UniBasic supported mnemonics can be stored in Universal files). Setting DL4DRIVERS to "ANSI Text" causes dL4 to create and read text files using the ANSI (ISO 8859-1) character set instead of the UniBasic character set. Options in the DL4DRIVERS parameter are case-insensitive and multiple options can be separated by commas. Examples: DL4DRIVERS="Universal" DL4DRIVERS="universal,ansi text" o A new option, "-O filename", has been added to LOADSAVE to produce an output file even if errors are detected during compilation. The option must be used instead of the standard "-o filename" option and produces a program file that can be loaded in SCOPE, but which cannot be executed until the errors are corrected. This option is equivalent to the SCOPE SAVE command that saves a program after reporting any detected errors. o The pipe driver has been extended to allow using both the TRANSLATE= and OPENAS= options in the same printer script. This supports scripts that use translation with the Windows Page Printer driver to implement user defined mnemonics such as 'SA' or 'SB'. The printer description file must be setup to perform a Unicode-to-Unicode translation using a "UnicodeDevice=True" entry in the "[Settings]" section. Since the output is being sent to a dL4 driver and not a physical device, macro definitions must output Unicode characters and dL4 Unicode mnemonic values. Example: rem dL4opts=translate=C:\progra~1\dl4\printer\dl4printer.prf rem dL4opts=openas=selected page printer rem dL4opts=lpi=8,cpi=10,hmargin=36,vmargin=36 The TRANSLATE= option must occur before the OPENAS= option. o A new driver, "Sorted Directory", is now available to provide a sorted directory listing. The driver is otherwise identical to the normal directory driver. The driver is used by opening a directory with an AS clause. Example: Rem List the current directory contents in sorted order Dim F$[255] Open #1,"." As "Sorted Directory" Do Read#1;F$ If F$ = "" Exit Do Print F$ Loop Close #1 o To increase compatibility with UniBasic, the following SPC() and MSC() functions have been added or changed: SPC(4) returns -1 or the value of the SPC4 runtime parameter SPC(264) returns -1 or the value of the SPC264 runtime parameter SPC(272) returns -1 or the value of the SPC272 runtime parameter MSC(2) returns -1 or the value of the SPC4 runtime parameter (MSC(2) is equivalent to SPC(4)) MSC$(-1) returns "" or the value of the SPC4 runtime parameter formatted as "RLLBBSS". MSC$(264) returns "" ERR(8) returns -1 o The SCOPE CHECK command has been enhanced to produce warning messages for string variables without DIM statements. The test only determines if a DIM statement exists for each string variable - it does NOT determine if the DIM statement will be executed prior to the first use of the string variable. o Behavior change: the LIBSTRING runtime parameter, if defined, is now used when finding a program filename specified on the "runc.exe" or "runw.exe" command line. o Behavior change: the error output format of LOADSAVE has been changed slightly to support the UniBasic to dL4 conversion package. o Behavior change: mode 3 of the PORT statement now supports the "Input ready" flag value of 32768 to indicate that the port is waiting for input. o A new mnemonic, 'ET', has been defined for UniBasic compatibility. The effect of using the mnemonic is dependent on the terminal definition file. o The POS() string search function has been extended to allow searching for a character that is or is not part of a specified set of characters. The expression "POS(S$, IS T$)" will search for the first character in the string S$ that matches a character in the string T$. The expression "POS(S$, EXCEPT T$)" will search for the first character in the string S$ that does not match a character in the string T$. These new search types can be combined with the optional step and occurrence options of the POS() function. o Limited support for polyfiles, similar to that of UniBasic, has been implemented to set key lengths in bytes rather than 16-bit words, set the first record number to zero, and return key lengths in bytes. Polyfile status can be set in an indexed contiguous file by creating the file with the "" attribute or using the intrinsic CALL VOLLINK(). o An input mode has been added to defer keyboard input after a GUI event has been reported. This prevents the user from entering data into the wrong GUI element (such as a 'WCSTRING' edit box) because the application hasn't had time to select the proper new GUI element. The defer mode is activated by printing a '1 WCEVENT' mnemonic string. Any GUI event that returns an action string to the application will cause keyboard input to be stored in an internal queue until the application prints a 'WCFOCUS' or 'BEGIN' mnemonic to set the input focus. After the focus is set, the queued keyboard input will be released to the selected GUI element until another GUI event occurs. Once selected by a '1 WCEVENT' mnemonic string, the deferred input mode applies to all windows and all input until a '0 WCEVENT' mnemonic string is printed. The current deferred input queue can be cleared by using a '2 WCEVENT' mnemonic string. o Behavior change: the 'LK' and 'UK' mnemonics can now be output to a window if the mnemonics are defined in the terminal definition file. o Behavior change: mnemonics in a window title will be ignored rather causing an "illegal character" error. o The 'AE', 'AD', 'BO', 'EO', 'BA', and 'EA' mnemonics have been added to the standard terminal definition files for terminals that support auxiliary printers. o Behavior change: the SCOPE LIST and SHOW command will now default to using "-v" paging behavior unless they are used in an EXEC command script. o Behavior change: the CHF(c) function will return a record count of zero for newly created portable files instead of one. o A leading numeric expression can now be used in a string concatenation expression that uses commas. For example, the statement 10 A$ = Spc(8),"at",Spc(10) is now legal. o A leading date expression can now be used in a string concatenation expression that uses commas. For example, the statement 10 A$ = Tim#(0)," is the current date and time" is now legal. o Input cursor tracking is now supported with the new 'BTRACK' mnemonic. This feature is similar to UniBasic cursor tracking except that is enabled by outputting the 'BTRACK' mnemonic rather than an octal "\001\". The LOADSAVE "-c" and SCOPE CONVERT command will convert statements such as INPUT "\001\";A$ to INPUT 'BTRACK';A$ If a converted application uses PRINT statements to enable cursor tracking, the PRINT statements must be manually converted. o A new option, "STRINGS HAGEN", has been added to provide compatibility with UniBasic HAGEN string mode. Example: OPTION DEFAULT STRINGS HAGEN o A new option, "ZERO DIVIDED BY ZERO IS LEGAL", has been added to make zero divided by zero equal to zero rather than causing an arithmetic overflow error. This option is also enabled by the "DIALECT IRIS1" and "DIALECT BITS1" options. Example: 10 Option Default Zero Divided By Zero Is Legal 20 Print 0 / 0 o A new option, "DIALECT IRIS1", has been added to provide a higher degree of BITS compatibility than "DIALECT IRIS". The new option enables the "ZERO DIVIDED BY ZERO" option in addition to the other "DIALECT IRIS" options. o A new option, "DIALECT BITS1", has been added to provide a higher degree of BITS compatibility than "DIALECT BITS". The new option enables the "DIALECT BITS" options and also enables BITS style FOR/NEXT final value behavior, BITS USING mask features, and an initial precision of 4%. o A new option, 'PROGRAM TAG "text"' has been added place user defined text in a program file as ASCII text. This option can be used to add revision text strings to be printed by the Unix "what" utility. Example: OPTION PROGRAM TAG "@(#) Test program 1.3" o A new driver, "ANSI Text", has been added to create and access text files that uses the ANSI character set. Using the driver is equivalent to opening a text file with the "charset=ansi" option. o When the setting "IsUnicodeDevice" is TRUE in a terminal or printer definition file, all characters and mnemonics will be passed unchanged unless a macro definition exists for the character or mnemonic. In previous versions, a macro definition was required for every character or mnemonic, o If an OPEN statement uses a "$" (output pipe) or "$$" (input pipe) filename to open a script, then the name of the current program will be passed to the script in the environment variable "DL4PROGRAM". The script can then use the program name to control printer spooling or special handling. o A new runtime parameter, "AVAILREC", can be used to specify the value returned by SEARCH as the number the records available in indexed contiguous files. If the "AVAILREC" parameter is not set, the SEARCH statement will return, as it did in previous dL4 releases, the actual number of records available from the file free list or a minimum value of one. o A new runtime parameter, DL4STOPDUMP, has been implemented to control whether a program dump should be written when a program exits via a STOP statement. If the environment variable DL4STOPDUMP is defined as an absolute path, then any program that exits via a STOP will cause a program dump file to be written to the path. The path can use the macro variables and other features of the DL4PORTDUMP runtime parameter. o Behavior change: the terminal type number return by SPC(13) and MSC(32) for dL4Term is now 410 rather than zero. This value can be changed in the dL4Term terminal definition file (term/dl4term). o The terminal type number returned by SPC(13) and MSC(32) for dL4 for Windows can now be configured by the setting the DWORD registry value "TermType" in: HKEY_CURRENT_USER\Software\DynamicConcepts\dL4\WinTerm\TermType or HKEY_LOCAL_MACHINE\Software\DynamicConcepts\dL4\WinTerm\TermType o The run utility now returns an "unsuccessful" exit status to the operating system if a program exits with a STOP statement. o A new setting, "StaleReadAllowed=True", is now supported in the file section of a bridge profile. This setting enables re-reading the current record data after the record has been unlocked. Use of this setting is not recommended because the actual data record may have been changed and the old data will be used for any re-read operations. This feature is provided for compatibility with programs that performed such reads on Indexed-Contiguous files and already suffered from potential inconsistent data. o When used with DynamicXport, dL4 now supports using "dl4l()" or "dl4t()" references within "dl4c(For)" structures in template files. The "dl4c" format has been extended to supported the format "dl4c(For,)" and "dl4c(For,=)" to allow "dl4v()" references to the current array index number. o Bug fixed: WCLIST boxes did not work correctly with hidden fields (option value 16) or empty list items. o Bug fixed: programs using unary operators such as "-" were always forced to the latest program object revision and could not be run by earlier versions of dL4. o Bug fixed: mismatched variable lists in CHAIN WRITE and CHAIN READ statements in SWAP programs caused the child program to silently exit instead of reporting an error to the parent program. o Bug fixed: the 'ML', 'MR', 'MD', and 'MU' keys are accepted in cursor tracking mode even if they are defined as illegal keys for normal input mode. Any mnemonic character will be accepted in Activate-On- Mnemonic mode. o Bug fixed: the SEARCH and GET statements could corrupt the memory image of a program if string literals were used as arguments. o Bug fixed: the characters 'SI' ("\017\") and 'FS' ("\034\") could not be printed to a dL4Term auxiliary printer. o Bug fixed: the conversion profile text edit feature (the "[Edit]" section) could not change the first symbol on a line. o Bug fixed: expressions in a MAT WRITE or MAT WRLOCK statement argument list caused an "Unrecognizable word: 12291" error when SAVEing the program. o Bug fixed: breakpoints set in the debugger for the current program unit were ignored. o Bug fixed: the QUERY utility reported UniBasic "Q" files as using "Mixed" numerics rather than IRIS numerics. o Bug fixed: the LIBR utility failed with an error message if a FoxPro Full-ISAM file was encountered in the listed directory. o Bug fixed: SWAP keys were not processed until the end of an INPUT preventing the SWAP program from reading the characters immediately following the SWAP key. o Bug fixed: the DynamicXport DxGet() CALL and function did not return the correct character values for 'FX' or 'FM' mnemonics. o Bug fixed: the "Printer->Preferences" dialog overwrote some printer parameters that are configurable only via the registry editor. o Bug fixed: closing a child window reported a GUI event to the parent window if the current parent window GUI element had the queue-on-loss- of-focus option set. o Bug fixed: functions keys were not passed from GUI elements to the parent window on Windows 95, 98, or ME. o Bug fixed: when converting OPEN statements in IMS programs, statements with multiple channel numbers did not accept more than one file after the second channel number. o Bug fixed: using a conversion profile to convert a function to a different result type (such as "ERM()" to "ERRMSG$()") caused a runtime error when the function was used. o Bug fixed: syntax errors in a conversion profile sometimes caused memory violations in LOADSAVE or while executing a CONVERT command. o Bug fixed: 256 and 257 character string and mnemonic literals were accepted by the compiler rather than producing the required syntax error. o Bug fixed: if a dL4 process was terminated by a Unix "kill -9" command, SPAWN statements failed for other users until the message queue associated with the killed processed was deleted. o Bug fixed: if an application updated a GUI element while the element had the focus, a "value change" event was triggered when the element lost the focus. o Bug fixed: the 'RECT' mnemonic and the BOX statement sometimes drew boxes that were taller and wider than they should have been. o Bug fixed: the SPC(n) function, where "n" was not a standard function number, only looked at runtime parameters in the environment and did not check the registry. o Bug fixed: TABbing between GUI fields did not work in '1WCEVENT' mode when input was deferred. o Bug fixed: dL4 output sometimes "froze" requiring the user to terminate the dL4 process. o Bug fixed: typing a function key while input was deferred in '1WCEVENT' mode caused an infinite loop. o Bug fixed: the printer driver sometimes lost output data when open with "binary=true". o Beta bug fixed: conversion profile "[Edit]" rules were not applied to line that did not have line numbers. o Beta bug fixed: conversion profile "[Edit]" rules were applied to the line number portion of a source line. Dec 4 2001 (Release 4.4) o The SAVE file revision has been changed from 2.11 to 2.12 in order to support new features in dL4 4.4. Full upward compatibility is provided, so program files created by earlier versions of dL4 can still be used. Programs created by this release of dL4 can be used by earlier releases of dL4 4.x if the programs do not use any of the new features. o Two new GUI mnemonics have been defined: 'WCBQRYBUF' and 'WCEQRYBUF'. Printing 'WCBQRYBUF' to a window enables special buffering for the data returned by the 'WCQUERY' mnemonic. Normally, sending 'WCQUERY' to a GUI element (such as 'WCSTRING') causes the element to return its current value. For example, sending 'n WCQUERY' where 'n' is the element number of a 'WCSTRING' edit box causes the text in the edit box to be returned as input to the window. This can complicate programming because query results are mixed in with event data such as function keys or GUI element status changes. The special buffering enabled by 'WCBQRYBUF' separates the query results from the event data. Event data can be read by normal INPUT statements, but the query buffer can only be read from "record 1" of the window channel. For example, ! Channel 3 is open to window Print #3;'WCBQRYBUF'; Print #3;'5 WCQUERY'; Input #3,1;S$ In order to read from "record 1" of the default window channel, use the special record number -3 (described below) or the DUPCHANNEL intrinsic CALL. Once a 'WCBQRYBUF' mnemonic is printed, the special buffering mode applies to all windows and persists until a 'WCEQRYBUF' or 'IORS' mnemonic is printed. Like other GUI mnemonics, these mnemonics are supported only when using dL4Term (4.3.1.3 or higher) or in dL4 for Windows. o The special channel numbers -3 and -4 can now be used in INPUT, READ, WRITE, SET, and other I/O statements to perform I/O to the current standard input (-3) and output (-4) channels. This extension is particularly useful when using the 'WCBQRYBUF' input mode since it supports reading from record 1 of the current window channel. o The intrinsic CALL DupChannel() now recognizes the special channel numbers of -3 and -4 as the current input and output channels. This allow access to the current Dynamic Window channel. o A new mnemonic, 'PGMHELPFN', has been defined for dL4 when used with dL4Term or in dL4 for Windows. The mnemonic sequence PChr$(n,"text");'PGMHELPFN' will program function key 'n' ('Fn') to send the character string "text" as input when pressed. In addition to "text", the function key will send the action string of the currently selected GUI element, if any. This mnemonic is similar to 'PGMFN', but can be used to implement context dependent function keys such as help or search keys. 'RF' or 'XX' mnemonics can be used to reset all function keys to their original values of 'Fn'. o A new function, MSC(45), has been implemented to return the GUI element number of the user selected GUI element or a WCQUERYed GUI element. The value returned is not the current element number, but rather the number at the time of the most recent input. For example, assume a user had selected edit box 1, typed 'F6', moved to edit box 5, and then typed 'F6' again. If an INPUT statement read only the first function key value, then MSC(45) would return 1, the selected element at the time the function key was pressed. The value of MSC(45) would not change to 5 until the second function key value was read by an INPUT or READ statement. o A new mnemonic, 'WCRESETFONT', has been defined for dL4 GUI programming. The new mnemonic restores the default font for use by newly created GUI elements. Typically, the mnemonic would be used to clear the font set by a previous 'WCSETFONT' mnemonic. o The statement SYSTEM 31,"C:\\Program Files\\Application\\program.exe",S will try to execute "program.exe" on the user's PC. The variable "S" will be set to zero if the program was successfully started and non-zero if the program couldn't be started. The SYSTEM statement suspends execution of the dL4 program and waits until the program exits. In the default configuration, the user will be prompted via a message box to permit or deny running the command. The DWORD registry value HKEY_CURRENT_USER\Software\DynamicConcepts\dL4\WinTerm\AllowSYSTEMCmd or HKEY_LOCAL_MACHINE\Software\DynamicConcepts\dL4\WinTerm\AllowSYSTEMCmd can be set to one to automatically accept commands without displaying the message box (note: if set to zero, an "AllowSYSTEMCmd" value in HKEY_CURRENT_USER will require the message box no matter how the HKEY_LOCAL_MACHINE value is set). This SYSTEM mode is included for compatibility with the client command execution feature of dL4 for Unix. o Two new mnemonics, 'SUSPENDAUX' and 'CONTINUEAUX', have been defined to suspend or continue output to an auxiliary printer after a 'BA', 'BO', or 'AE' mnemonic has started output to such a printer. These mnemonics make it possible to mix output between the printer and the screen. o The Preferences->Printer dialog now allows the user to set an "Options" value. The "binary=true" option can be used with non-device printers to allow unformatted character sequences, such as PCL commands, to be sent directly to a printer (device printers always operate in a binary mode). o A new runtime parameter, DL4HANGUPEXIT, can be set to trigger an automatic exit if an unrecoverable error occurs on standard input or standard output. The feature can only be used if standard input or output are open to sockets. o A new SYSTEM statement mode has been added to return the number of available 512 byte disk blocks on a file system. The statement SYSTEM 32,"path",B returns in "B" the number of available blocks on the file system that contains the directory or file "path". The SCOPE CONVERT command and LOADSAVE utility "-c" option will convert UniBasic/BITS UNIT mode 3 statements to SYSTEM 32 statements. o Conversion profiles can now define functions to be translated in addition to user CALLs. For example, if the line "ERRMSG$=ERM" is included in a library section of a conversion profile, then loading a program with that profile will convert all instances of the ERM function to ERRMSG$ and the required declarations for the library function will be inserted into the converted program. o Conversion profiles can now include a "[Standard]" section to define the standard pre-defined function names of the source language. This section can be used if there are problems with names that collide with dL4 standard function names (such as "TRIM$"). o Conversion profiles can now include a "[Settings]" section. The "LANGUAGE=xxxx" line in the "[Settings]" section selects the source language for the conversion where "xxxx" can be "IRIS", "BITS", or "IMS". If the source language is "IMS", statements such as 'OPEN #c;"R","Filename"' will be converted to 'ROPEN #c;"Filename"'. o When loading a program using a conversion profile, parenthesized subscripts are now converted to bracket subscripts ("A(5)" becomes "A[5]"). o The syntax of the multiline IF structure has been enhanced to accept an optional "THEN" keyword after an IF or ELSE IF boolean expression. The "THEN" keyword is accepted and discarded. o The LOADSAVE utility now supports a "-C filename" option to perform source-to-source conversions. The command: loadsave -C converted.bas -c convert.prf orig.bas converts the program text source file "orig.bas" to dL4 using the conversion profile "convert.prf" and outputs the converted program text to the text file "converted.bas". The conversion profile can contain an "[OutputFormat]" section with lines such "Indentation=n", "LeftMargin=n", and "TabSpacing=n" to control the formatting of the output lines. The "TabSpacing" value specifies that a tab character should replace each occurrence of "n" leading spaces. These values can also be specified on the loadsave command line by using the "-i n,m" and "-t n" options. o A simple include file feature has been added to the LOADSAVE utility. The INCLUDE statement is recognized only by LOADSAVE and reads source text from a specified file into the program following the INCLUDE statement. The environment variable INCSTRING can be used to specify a space separated list of directories that should be searched when opening an include file. If lines in an include file use line numbers, the lines will be inserted at the specified lines replacing any previously loaded lines with those line numbers. The INCLUDE statement can have both a line number and a label. Example: Include "filename" o A new option, "-n linenumber", has been added to the LOADSAVE utility to specify the starting line number when using source files without line numbers. By using a starting line number other than the default of 1, an open range of line numbers can be left for use by conversion profiles that insert declarations and other header lines. o A program line can now consist of a label without a statement. For example, the line: NEXTFILE: is now legal and will be treated as the label "NEXTFILE" followed by an empty comment ("NEXTFILE: !"). o To improve compatibility with other BASIC languages, it is now legal for a program line to have a FOR statement follow an IF statement. o A new channel function, CHF$(1300+c), has been implemented to return the native path of the file open on channel "c". o A new channel function, CHF(1400+c), has been implemented to return the file identification number of the file open on channel "c". In dL4 for Unix, this function returns the inode number of the file. In this release, this function is only supported by the raw file driver. o Channel functions 12 and 13 have been added to the list of channel values displayed by the SCOPE FILE command and in program dumps. o The GET statement can now be used to determine the character set used by data file records. For example, the statement: Get #C,-1299;Name$ stores in "Name$" the name of the character set used on channel "C". An error will occur if this operation is not supported by the driver open on channel "C". o The LUMAP runtime parameter can now control whether portable filenames are treated as case-insensitive (default) or case-sensitive. If the LUMAP parameter value begins with "(mixedcase)", all portable (relative) filenames will be treated as case-sensitive. This option only controls how filenames are translated to and from the native filename format; the result of using case-sensitive filenames on a non-case-sensitive file system is operating system dependent. o A new, optional program file format is now available for Unix systems to allow direct execution of dL4 programs from a shell command line. The new format starts each dL4 program file with the line "#!string" where string is a program path. For example, the command: save <755> (exec=/usr/bin/run) programname would save the current program into the file "programname" as an executable script with an initial line of "#!/usr/bin/run". The program file could then be executed directly at a shell command line by typing "programname". The program file would also be usable in dL4 SCOPE, in CALL/CHAIN/SPAWN statements, or in dL4 for Windows. The "exec" line can include options RUN such '-t ""'. In addition to the "exec=" option, executable Unix scripts can be produced by using the "stdexec" or "netexec" options which are equivalent to "exec=/usr/bin/run" and "exec=/usr/bin/run -t". Program files can be made executable on Windows systems by using a unique filename suffix such as ".dl4" and then associating that suffix with the required command line. o A new program option, "STRING REDIM IS LEGAL", has been implemented to make it legal to re-dimension simple string variables without FREEing the variable. The following program creates a string variable with a dimension of 20 and then expands the string to a dimension of 80: 100 Option String Redim Is Legal 110 Dim S$[20] 120 S$ = "Test program" 130 Dim S$[80] 140 S$ = S$ + " with too many characters for DIM S$[20]" 150 Print S$ Note that the original value of S$ is preserved when it is expanded. o Support has been added for DynamicXport Lite. o Channel command 36 (DCC_SETOPENMODE) can now change the exclusive or shared open mode of an open file. This operation is currently supported in Portable/Universal Indexed, Contiguous, or Formatted files. Example: Channel 36,#10;"E" ! change to exclusive open o New intrinsic CALLs SYSRC() and DBASE() have been added to provide compatibility with other Business BASICs. o Two new intrinsic CALLs, RMVSPACES() and RMVSPACESI(), have been added to duplicate the behavior of CALL $RSPCS() in UniBasic and other BASICs. BASIC syntax: Call RemoveSpaces(SOURCE$, DEST$, MODE) Call RemoveSpacesI(SOURCE$, DEST$, MODE) If "MODE" is not equal to one, then "SOURCE$" is copied to "DEST$" with all leading and trailing spaces removed. If "MODE" is equal to 1, then "SOURCE$" is copied to "DEST$" with all spaces removed except those within quotes, all characters after and including an unquoted "!" are removed, and a trailing linefeed is appended if the string ends in a "!". Call RemoveSpaceI() differs in that "MODE" 1 always appends a linefeed and a "MODE" other than 0 or 1 causes an error. o A new intrinsic CALL, WHOLOCK(), is now available for compatibility with dL4 for Unix. This CALL is used on Unix to determine which port or process has locked a specific record of a file. Because the Windows operating system does not support this function, the CALL will always report the record as unlocked. The CALL syntax is: CALL WHOLOCK(Channel, RecordNumber, PortNumber [, ProcessID]) where "Channel" is a channel number open to a file and "RecordNumber" is the record number in that file to be tested. When the CALL returns, "PortNumber" will be set to -1 to indicate that the record is not locked. o A new intrinsic string function, DATEUSING$, has been implemented to format date values. The function syntax is: DateUsing$(DateValue#, FormatString$) where "DateValue#" is a date expression to be formatted and "FormatString$" is a string expression containing a mask string. The following formatting codes are recognized in the mask string: D Numeric day of week (0 - 6, 0 is Sunday) d Numeric day of week (0 - 6, 0 is Sunday) DAY Day name in upper case (SUNDAY, MONDAY, ...) day Day name in mixed case (Sunday, Monday, ...) Day Day name in mixed case (Sunday, Monday, ...) DY Abbreviated day name in upper case (SUN, MON, ...) dy Abbreviated day name in mixed case (Sun, Mon, ...) Dy Abbreviated day name in mixed case (Sun, Mon, ...) DD Numeric day of month zero filled ("01" - "31") Dd Numeric day of month space filled (" 1" - "31") dD Numeric day of month space filled ("01" - "31") dd Numeric day of month ("1" - "31") DDD Numeric day of year zero filled ("001" - "366") Ddd Numeric day of year space filled (" 1" - "366") ddd Numeric day of year ("1" - "366") HH Numeric hour of day zero filled ("00" - "23") Hh Numeric hour of day space filled (" 0" - "23") hH Numeric hour of day space filled (" 0" - "23") hh Numeric hour of day ("0" - "23") MM Numeric month of year zero filled ("01" - "12") Mm Numeric month of year space filled (" 1" - "12") mm Numeric month of year ("1" - "12") MONTH Month name in upper case (JANUARY, FEBRUARY, ...) month Month name in mixed case (January, February, ...) Month Month name in mixed case (January, February, ...) MON Abbreviated month name in upper case (JAN, FEB, ...) mon Abbreviated day name in mixed case (Jan, Feb, ...) Mon Abbreviated day name in mixed case (Jan, Feb, ...) NN Numeric minute of hour zero filled ("00" - "59") Nn Numeric minute of hour space filled (" 0" - "59") nN Numeric minute of hour space filled (" 0" - "59") nn Numeric minute of hour ("0" - "59") PM "AM" for time before noon, "PM" for time afterward pm "am" for time before noon, "pm" for time afterward P "A" for time before noon, "P" for time afterward p "a" for time before noon, "p" for time afterward Q Numeric quarter of year ("1" - "4", 1 is Oct - Dec) q Numeric quarter of year ("1" - "4", 1 is Oct - Dec) SS Numeric second of minute zero filled ("00" - "59") Ss Numeric second of minute space filled (" 0" - "59") sS Numeric second of minute space filled (" 0" - "59") ss Numeric second of minute ("0" - "59") TH Ordinal number in upper case ("1ST", "2ND", ...) th Ordinal number in lower case ("1st", "2nd", ...) WW Numeric week of year zero filled ("01" - "53") Ww Numeric week of year space filled (" 1" - "53") wW Numeric week of year space filled (" 1" - "53") ww Numeric week of year ("1" - "53") YYYY Four digit year YY Two digit year Formatting codes are replaced by their associated values. Any unrecognized characters will be copied unchanged to the result string. Example: Print DateUsing$(Tim#(0), "MM/DD/YYYY HH:MM") o The SPC(n) function has been extended to return the numeric value of the environment variable "SPCn" where "n" is an undefined SPC function number. For example, if the environment variable SPC105 was set to "65", then SPC(105) would return a value of 65. User defined SPC functions should be defined at 100 and above to avoid conflicts with any future standard SPC functions. o The intrinsic CALL PROGRAMDUMP() has been extended with a second syntax: Call ProgramDump(filename$,options$) where "filename$" is the output file path and "options$" can be set to the string value "append" to cause PROGRAMDUMP() to append the new output to the output file rather than replacing the output file. o The FoxPro Full-ISAM driver now supports mixed case filenames when used in an absolute path. o A new open option, "DataExt=xxxx", has been added to the FoxPro Full-ISAM driver to support opening dBase files that do not have the standard ".dbf" extension. o A new character set, "Stripped ASCII", has been added to support conversion of files from other BASICs where the most significant bit of 8-bit characters is ignored. o The Portable Formatted, Contiguous, and Indexed-Contiguous file drivers now support a new option, "NUMMAP=IEEE-LE", for files that contain least significant byte first ("Little Endian") data. This feature has been added to support conversion of non-dL4 data files. o Bug fixed: the CHF(600) function returned incorrect values for directories. o Bug fixed: the timeout equals -5 option to disable record locking on formatted and contiguous files did not work. May 1 2001 (Release 4.3.1) o The DynamicXport runtime support in dL4 has been updated to support the current release of DynamicXport. o The DynamicXport intrinsic CALLs (DXOPEN, DXCLOSE, DXGET, DXSET, and DXURL) require a DynamicXport product license in the SSN before the CALLs can be used. Without a valid DynamicXport license, the CALLs will generate an error 38. o A new open option, "binary=", has been implemented in the pipe driver. If a pipe is opened with a "binary=true" option, all data written to or read from the pipe will be passed as 8-bit binary characters without any formatting or end-of-line processing. Example: Open #1,"(binary=true)$program" o Two new open options have been added to the Windows Page Printer driver. The "LPI=n" option selects a default font size such that "n" lines per inch will be printed. The "CPI=n" option selects a default font size such that "n" characters per inch will be printed. The two options can be used together. The following example shows a printer script that uses 8 lines per inch, 10 characters per inch, with half inch horizontal and vertical margins: rem dl4opts=openas=selected page printer,lpi=8,cpi=10,hmargin=36,vmargin=36 rem rem dL4 selected by dialog printer script o A new intrinsic CALL, NCRC32(), has been implemented for compatiblity with Unibasic 7. The CALL provides the same functionality as the existing CRC32() intrinsic function. The new CALL has the following syntax: CALL NCRC32(C, S$ [, O]) where "C" is a ten digit or larger numeric variable that will receive the calculated CRC-32 checksum, "S$" is a string value to be checksummed, and "O" is an optional numeric value containing a CRC-32 value from a previous calculation. o A new MSC() function, MSC(44), has been implemented so that programs can determine if the Dynamic Windows system is active. If Dynamic Windows is "on", MSC(44) will return one. If Dynamic Windows is "off", then MSC(44) will return zero. o The checksum utility in the tools directory now accepts a "-m" option to generate MD5 checksums instead of CRC-32 checksums. o Bug fixed: multiple selection list boxes (such as 'WCLIST') did not work on Windows 95/98/ME systems if two or more items were selected. Mar 13 2001 (Release 4.3) o Four new intrinsic CALLs have been added to support writing DynamicXport applications. The new CALLs are DXOPEN, DXCLOSE, DXGET, and DXSET which are described in the DynamicXport programming documentation. DynamicXport is a new middleware product from Dynamic Concepts. o A local and private cache for dL4 programs has been implemented to improve program load performance, particularly when programs are loaded from remote networked file systems. The feature can be enabled by setting the environment variable DL4LOCALCACHE to the size of the desired local cache in bytes. The cache resides in process memory, is not shared with other users, and may increase process size. Programs in the local cache are identified by the absolute path of the program file. If a program file is modified while it is in the local cache, the old version in the local cache will continue to be used until the program is flushed from the cache by lack of use or a local SAVE command to the file. To effectively use the local cache, programs should be in the first program search directory (for example, the first directory in the LIBSTRING environment variable). o A new driver, "Bidirectional Command Pipe", has been added to allow opening bidirectional pipes to an operating system command or program. Using the driver, it is possible to start a command and then both write data/commands to the command and read the results. o A new mnemonic, 'WCDEFAULTBTN', has been implemented to create default push buttons. These buttons are identical to those created by the 'WCBUTTON' mnemonic except that the button is marked as the default and will be triggered by the user typing ENTER if the focus is on the button or on another non-pushbutton GUI input element. The arguments to the 'WCDEFAULTBTN' mnemonic are identical to those of the 'WCBUTTON' mnemonic. Note: if the 'nWCFOCUS' mnemonic is used to set focus to a non-default pushbutton, that button becomes the default. o Enhancement: the 'BEGIN' mnemonic can now be sent to GUI edit boxes (such as 'WCSTRING') to place the cursor at the start of the current text and to select the current text for replacement. The user can tab or otherwise move to a different GUI element to leave the value unchanged or type new characters to completely replace the existing value. To send the 'BEGIN' mnemonic to an edit box, the edit box must be the currently selected GUI element (via 'nWCSELECT'). The following example could be used to initialize the contents of a newly created 'WCSTRING' edit box and select the contents for replacement: Print '4WCSELECT';"Initial Data";'BEGIN';'0WCSELECT'; The 'n BEGIN' mnemonic can be used to perform the 'BEGIN' function on GUI element "n" and also set the input focus to that element: Print '4BEGIN'; o Enhancement: the drop down section of drop down lists ('WCLISTDROP' and 'WCEDITDROP') can now extend below the bottom of the window on which the list is placed. This makes it possible to place a drop down list near the bottom of a window. If the drop down section extends below the bottom of the screen, the drop down section will be displayed above the normal position. o Enhancement: the 'WCQUERY' mnemonic can now be used with two numeric parameters. The mnemonic 'm,n WCQUERY' (or PChr$(m,n);'WCQUERY') performs a WCQUERY on all GUI elements between m and n inclusive. o ESCAPE, ABORT, and function key ('Fn') characters typed in a GUI input element (such as 'WCSTRING') are now passed to the parent window of the GUI element. This allows applications to use ESCAPE and function keys to trigger special actions in GUI programs. o A new mnemonic, 'n WCWHERE', has been implemented to return as input the action 'n' string value of the GUI element currently selected as the input focus. See 'WCACTION' in the dL4 GUI tutorial for details on action strings. o "Clicking" on a selected item in a list box ('WCLIST') now unselects the item. o The 'UNMARK' mnemonic is now supported for single selection list boxes. o Behavior change: list boxes ('WCLIST') now occupy the full vertical space assigned to the box. Previously, the height was truncated to eliminate any partially displayed list items (a list box that was 4.5 items high was displayed as 4 items high). This change makes it possible to align the bottoms of list boxes with varying heights. o Behavior change: the MODAL style is no longer ignored in child windows. A MODAL child window will disable all GUI input elements and typing in the parent window. The parent window itself is not otherwise disabled because that would disable the child window. o A new option value, 32, has been implemented for all GUI input elements. The new option causes any loss of input focus to be reported as an input value change (option 2). o Buttons ('WCBUTTON'), check boxes ('WCCHECK'), and radio buttons ('WCRADIO') now support multiline labels. Carriage returns ('CR') can be placed in labels to explicitly split lines. o The hidden field option, option 16, is now supported in list drop boxes ('WCLISTDROP'). o A new printer mnemonic, 'nLANDSCAPE', has been implemented to select landscape mode if "n" is 1 and portrait mode if "n" is 0. The mnemonic should only be used at the beginning of a page. o New mnemonics 'n,d GRIDENGLISH', 'n,d GRIDMETRIC', and 'n,d GRIDFONT" have been created to provide a higher precision method of setting the coordinate grid. In these new two parameter mnemonics, "n" and "d" are the numerator and denominator of a fraction which is passed to the mnemonic as a parameter. Thus the mnemonic string '1000,72 GRIDENGLISH' is equivalent to 'x GRIDENGLISH' where "x" is equal to 1000/72. Since 'GRIDENGLISH' sets the coordinate grid in 1000ths of an inch, this sets the grid to 1/72 inches (points). These mnemonics are supported by both the window and page printer drivers. o A new mnemonic 'n LPI' has been implemented to set the number of lines per inch when printing to the Page Printer driver. o A new mnemonic 'n CPI' has been implemented to set the number of characters (columns) per inch when printing to the Page Printer driver. A second form, 'n,d CPI' has been implemented to use the fraction "n/d" when setting the number of columns per inch. o A new mnemonic, 'n FONTCELL', has been implemented to set the font height by specifying the line height, rather than the character height. The mnemonic argument is in grid coordinates and is identical to that used by 'n FONTSIZE'. o A new mnemonic, 'MARGIN', has been implemented to set horizontal ('w MARGIN') and vertical ('w,h MARGIN') margins in the Page Printer driver. The arguments to the mnemonic are margins expressed in grid coordinate system units. For example, if the current coordinate grid is tenth inches ('100GRIDENGLISH'), then a half inch left margin can be set by '5MARGIN' or a half inch left margin combined with a one inch top/bottom margin can be set by '5,10MARGIN'. o A new open option, "BINARY=", has been added to the Page Printer drivers. This option causes all characters printed to a printer channel to be sent directly to the printer without any processing or translation. All characters sent in this mode must be between 1 and 255 decimal. This option is intended for applications that need complete printer control. Example: Open #1,{"","binary=true"} As "Default Page Printer" o A new function, MSC$(8), has been implemented to return the native path separator string. Under dL4 for Windows, MSC$(8) returns "\". o The IOBO mnemonic now accepts either "\377\" or "\177\" as the count terminator. o A LEVEL command has been implemented in SCOPE to return the dL4 revision level and the license number. o A SHOW command has been implemented in BASIC to find all lines containing a specified variable name. The command syntax is identical to that of the FIND command. o The GUI window driver now treats the 'LK' (lock keyboard) and 'UK' (unlock keyboard) mnemonics as no-ops rather than reporting an illegal character error. o Behavior change: if the input focus is on a 'WCBUTTON' button and the tab option is enabled on at least one GUI element in the same window, then typing ENTER will trigger the button. o A new startup option, "-X", has been added to support DynamicXport applications. DynamicXport applications written in dL4 are started with the command "run -X programpath". This format identifies the program as a DynamicXport application and configures dL4 with necessary options. The "-X" option disables all terminal translation. o A new startup option, "-B", has been added to set the initial I/O mode of the standard input and output channels to binary I/O without input echo. o The intrinsic CALL ENV() has been extended to support runtime modification of the SPC(5), SPC(7), and MSC(7) values. Setting the values of the SPC5, SPC7, or MSC7 environment variables will control the subsequent values returned by the SPC() and MSC() functions. o A new open option has been added to the pipe driver. The CLOSEWAIT option sets the time in seconds that the driver will wait for the child process to exit when the channel is closed. The option "CLOSEWAIT=0" will not wait at all. The pipe driver does NOT terminate the child process when the CLOSEWAIT period expires; the driver simply closes the channel and leaves the child process running. Example: Open #1,"(closewait=120)$$script.sh" o Behavior change: a file specification can now contain more than one file attribute specification. Multiple specifications are concatenated before the attributes are processed. Example: Build #1," [1:40] <00> filename" o Behavior change: the 'BG' and 'EG' mnemonics are now ignored by the Page Printer driver instead of causing an "illegal character" error. o A new utility, MAKEHUGE, has been added to the tools directory to convert Indexed Contiguous or Formatted files to Huge Indexed Contiguous and Huge Formatted files. This permits the files to grow beyond 2 gigabytes in size. Note: huge files can be used only on Windows NT, Windows 2000, and some Unix systems. o A new intrinsic string function, Trim$(), has been added to remove both leading and trailing blanks or other whitespace. Since Trim$() is an intrinsic function, a "DECLARE INTRINSIC FUNCTION TRIM$" statement is required in order to use the new function. o A new intrinsic CALL, FlushAllChannels, has been added to request the operating system to write all system buffers to disk for each open channel. The CALL performs a "CHANNEL #c,DCC_SYNC,1;" on each open channel. Example: Declare Intrinsic Sub FlushAllChannels Call FlushAllChannels() o Operating system file buffers are now flushed whenever a file is closed. This improves file stability if a system is shutdown improperly. o A new open option, "RTRIM=", has been implemented in the Full-ISAM drivers. If the option "RTRIM=TRUE" is used, all trailing spaces are removed when reading fields. The option is case insensitive and an argument of "T" is identical to "TRUE". Example: Open #1,"(rtrim=t)test.dbf" o The GET statement can be used to retrieve the local or remote IP addresses associated with a socket. Example: Get #c,-1598;RemoteAddress$ Get #c,-1599;LocalAddress$ By using the DUPCHANNEL intrinsic CALL, these operations can also be used on the standard input and output channels if they are open to a socket. o Behavior change: the ROPEN statement can now be used to open a directory. Previously, an "illegal open mode" error was generated. o Extension functions have been added to the communications, program, and Microsoft SQL Server Full-ISAM drivers to ease customization. See driver\wcommext.c, driver\progext.c, and driver\msqlext.c for details. o Spaces are now allowed in Microsoft SQL Server Full-ISAM field, table, owner, or database names. Such names must be quoted. o The operation "CHANNEL #c,20,1;" has been implemented to flush operating system buffers associated with the file open on channel "c". o A new utility, VERINDEX, has been added to the tools directory to verify the index portions of Portable or Universal Indexed Contiguous files. The utility can detect various forms of index corruption. o Bug fixed: a statement with a trailing backslash such as "10 A=1 \" was not recognized as a syntax error and sometimes caused a memory violation if the program was executed or SAVEd. o Bug fixed: radio buttons reported a value change only on the first occurrence. o Bug fixed: new independent windows were sized using the coordinate system of the last accessed window instead of the main window. o Bug fixed: 'nWCMARK' did not work after 'CU' was sent to a list box or drop down list box. Also fixed a memory leak when using hidden fields. o Bug fixed: GUI option 4, report changed value, treated any gain of focus in a radio button as a changed value. o Bug fixed: memory violations sometimes occurred after immediate mode PRINTs of non-existent structure variables. o Bug fixed: the command "m DELETE n" caused a memory violation if line "m" was greater than line "n". o Bug fixed: the 'n WCUNMARK' mnemonic would unselect item "m" in a single selection list box if "m" was currently selected, but item "n" was not. o Bug fixed: tabbing between GUI input elements is now supported in child windows and is no longer restricted to the main and independent windows. o Bug fixed: closing a window and then immediately opening a new window caused some output for that new window to be directed to the main window. o Bug fixed: GUI elements and child windows were not positioned correctly when a window was scrolled from the 0,0 position and under some other circumstances. o Bug fixed: If GUI input elements with tab options existed in the parent window, it was not possible to enter input in a child window. o Bug fixed: the Microsoft SQL Server Full-ISAM driver now detects when the maximum number of connections has been exceeded and reports an error 82, "too many channels in use". o Bug fixed: the Microsoft SQL Server Full-ISAM driver no longer treats an option string of "" as a file syntax error. o Bug fixed: deallocating a non-existent record with the SEARCH statement decremented the number of records in-use count in a Portable Indexed Contiguous file. o Bug fixed: single character reads or reads with timeouts from a text file or pipe sometimes lost characters. o Bug fixed: address violations sometimes occurred when SAVEing a program. o Bug fixed: entering the debugger or enabling a program trace while in a SWAPped program sometimes caused file corruption. o Bug fixed: certain types of file corruption in the index portion of an Indexed Contiguous file caused applications and dL4 itself to hang. o Bug fixed: a parameter mismatch in an EXTERNAL FUNCTION call sometimes caused a memory violation. o Bug fixed: outputting a bad mnemonic sequence to the Page Printer driver sometimes caused the driver to hang. o Bug fixed: printing a mnemonic with a string parameter to the PFILTER utility sometimes caused following mnemonics to fail with a bad character error. Aug 1 2000 (Release 4.2) o The maximum size of the index portion of Portable and Universal Indexed-Contiguous files has been increased to 256 gigabytes on Windows NT or Windows 2000 systems. The size of the data portion is limited only by the amount of storage space available. To use this feature a file must be created as a "Portable Huge Indexed- Contiguous" or "Universal Huge Indexed-Contiguous" file. Example: Build #1,"[1:40]File" As "Portable Huge Indexed-Contiguous" o The "H" option letter ('BUILD #1,"[10:100]file"') can be used to select the "Huge" format when creating a Portable Formatted, Contiguous, or Indexed file. This option allows a file to grow to more than 2 gigabytes in size on Windows NT or Windows 2000 systems. o The 'BA', 'EA', 'BO', 'EO', 'AE', and 'AD' mnemonics are now supported to direct output to an "auxiliary printer". When printer output is enabled, output will be sent to the printer selected via the "Printer" sub-menu of the "Preferences" menu. That printer can be configured to be a specific Windows printer, the default Windows printer, a user selected Windows printer, a COMn serial device, or an LPTn printer device. When sending output to a Windows printer, a document will be considered complete and all pages will be printed when auxiliary output is disabled by an 'EA', 'EO', 'AD', or 'XX' mnemonic. A program should not expect to be able to suspend output with 'EA', 'EO', or 'AD' and then later continue output on the same printer page. o The 'WS', 'ES', 'SO', and 'SF' mnemonics are now supported to display a status line at the bottom of a window. The 'WS' mnemonic redirects all output to the status line until an 'ES' mnemonic is output. The 'SO' (status line on) and 'SF' (status line off) mnemonics control whether the status line is visible. Note: the mnemonics and status line text must be output to the window that will contain the status line. When using dynamic windows ("WINDOW OPEN"), the "WINDOW OFF" statement or the CALL DUPCHANNEL intrinsic should be used to output status line mnemonics to the main window rather than the current window. o The 'WD' and 'NR' mnemonics have been implemented to change the current font size to either the default font size or 6 tenths of the default font size. Assuming a default window width of 80 characters, the 'NR' mnemonic will set the font and window size to provide a width of 132 narrow characters. Both mnemonics clear the window with the equivalent of a 'CS' mnemonic. o A new mnemonic, 'PGMFN' has been defined to control the text sent by the 'Fn' function keys. The mnemonic sequence PChr$(n,"text");'PGMFN' will program function key 'n' ('Fn') to send the character string "text" as input when pressed. The 'RF' or 'XX' mnemonics can be used to reset all function keys to their original values of 'Fn'. o A new mnemonic, 'INVERT' has been defined to invert colors within a specified region. The mnemonic has the following forms: 'INVERT' - Invert colors from the current position to the end of the current line. 'n INVERT' - Invert colors from the current position for 'n' characters. 'w,h INVERT' - Invert colors from the current position within a rectangle of 'w' characters width and 'h' characters height. 'x1,y1,x2,y2 INVERT' - Invert colors within rectangle defined by the points 'x1,y1' and 'x2,y2' of the current coordinate grid. o In Windows, the user can exit dL4 by selecting the exit button or the "close" action of the system menu. Exiting dL4 in this manner prevents the application from cleaning up any partially written transaction. A new mnemonic, 'ONCLOSE', has been defined to allow applications to control such exits. The 'ONCLOSE' mnemonic has the following forms: PChr$(0,"text");'ONCLOSE' - Display "text" within a message box and give the user a choice of exiting dL4 or continuing the application. PChr$(1,"text");'ONCLOSE' - Display "text" within a message box and prevent the user from exiting dL4. PChr$(2,"text");'ONCLOSE' - Prevent the user from exiting dL4 and treat "text" as input for the program. PChr$(0,"");'ONCLOSE' - Disable any previously set ONCLOSE action. Programs using the 'ONCLOSE' mnemonic should output a null action ('PChr$(0,"");'ONCLOSE') or an 'XX' mnemonic before exiting to clear the ONCLOSE action. Note: this mnemonic will also be supported by dL4 4.2 for Unix when used with dL4Term 4.2. o Scrolling performance of a full window has been improved by 50 to 80 percent on typical systems. o Behavior change: input to any window can now be read from any window. For example, if windows are open on channel 1 and channel 2, pressing a button in the window open on channel 1 will create input that can be read on either channel 1 or channel 2. This change makes it easier for programs to use more than one input window at a time. Note that when using multiple windows, all of the GUI elements should have unique element numbers even if the elements are in different windows. o The "Initial Values" sub-menu of the "Preferences" menu has been renamed as the "Window" sub-menu. o A new driver class, "Email", has been added to send email. In this release, the driver requires sending email through an SMTP server such as provided by Unix servers or most ISPs. Non-SMTP mechanisms may be added in the future and should not require any application changes unless SMTP specific options (such as "SERVER=") are used (use the DL4EMAILSERVER registry entry instead). After opening the driver, a program simply prints text to be emailed to the channel. Files can be attached and sent as part of the email by using an 'ADD #c;"Filename"' statement. If the file consists of multiple files, like an Indexed Contiguous file, each subfile must be sent with a separate ADD statement. The path argument to the driver is an email address list. An email address list consists of one or more space separated email addresses. Email address lists are also used in the options such as "TO=" described below. The driver options parameter ("(xxx)") can be used to pass the following options: "TO=addresses" one or more destination email addresses. May be used in addition to or instead of placing addresses in the path. "BCC=addresses" one or more "BCC" email addresses. These are similar to "CC" addresses, but they are not included in the email header. "CC=addresses" one or more "CC" email addresses. "FROM=addresses" one or more sender addresses. "REPLYTO=addresses" one or more reply addresses. This option would only be used if the reply address was different from the sender ("FROM=") address. "SUBJECT=text" email title or subject. The text may be placed in quotation marks if necessary. "SERVER=name" SMTP server name. Defaults to the value defined in the registry (see below). "PORT=n" SMTP port number. Defaults to the standard SMTP port. "PROTOCOL=name" Email protocol name. Only "smtp", the default protocol, is supported by this release. "ATTACHAS=name" File attachment encoding type. This option must be specified if file attachments will be used. The value of "name" must be either "mime" or "default" (which is "mime" in this release). "TIMEOUT=n" timeout period in tenth-seconds for communication with the SMTP server. This option is used to increase the default timeout period and should not be needed. A program using the email driver must specify at least one destination email address in the path or a "TO=" option. At least one "FROM=" email address must be provided. The SMTP server name must be defined via the "SERVER=" option, or in the registry under one of the following values: HKEY_CURRENT_USER\Software\DynamicConcepts\dL4\Environment\dL4EmailServer HKEY_LOCAL_MACHINE\Software\DynamicConcepts\dL4\Environment\dL4EmailServer or as the environment variable "DL4EMAILSERVER". After all email text has been output and all attachments added, the email channel should be CLOSEd to actually send the email. If the channel is CLEARed, the driver will attempt to cancel the email. Example: Open #1,"(From=name@domain,AttachAs=Mime) nobody@dynamic.com" As "Email" Print #1;"Test the email driver" ! Append the file "Filename" as an attachment Add #1;"Filename" Close #1 Please change the "From=" and destination email addresses to your own email address before using this example. Note: unlike early beta release versions, the email driver uses native filenames for attachments. o A "-u" option has been added to the BASIC DUMP command to produce listings with line numbers even for programs that don't need line numbers. o A command history has been added to SCOPE so that the up and down arrow keys can be used to recall previously typed commands. The user can then repeat or edit the command. o The BASIC EDIT command now supports using the up and down arrow keys to select additional lines for editing after entering EDIT mode. o The BASIC LOAD command has been extended to load programs from program files as well as source files. o A "tools" directory has been added to the standard runtime installation. This directory contains the following utilities from the dL4 samples package: buildfi - utility to create Full-ISAM files buildxf - utility to create Indexed-Contiguous files checksum - utility to calculate 32-bit CRC file checksums convert.prf - sample conversion profile pgmcache - program cache utility query - utility to display file type and characteristics term - utility to display port status or terminate programs o A "-t terminaltype" option has been added to "runc.exe" to select the terminal definition file. This option is provided primarily for compatibility with a similar option in dL4 for Unix, but might be used to select a special terminal definition file for use with CGI programming. o Behavior change: to increase compatibility with the character oriented window driver, independent windows can now be moved using the main window coordinate grid. Independent windows without the "TITL" style will no longer have a minimal border. In dL4 4.1, independent windows could only be moved by the user dragging the title bar and a thin line was used as a border for windows without the "TITL" style. Note: most applications should use child windows (see below) rather than independent windows. o Behavior change: The child window open syntax: OPEN #c,{"title","style",width,height,parent,column,row} As "Window" has been extended so that 'parent', which is normally the channel number of the parent window, can be -1 to indicate the main window. This feature makes it unnecessary to use the CALL DUPCHANNEL intrinsic to assign a channel number to the main window. o Behavior change: the 'WCNUMBER' mnemonic now produces an edit box that accepts signed floating point numbers rather than just non-negative integers. The numbers must be in the format <"."> where the sign and decimal point are optional. Entering an illegal character will be rejected. Note: the edit box may return a value such as "-", ".", or "-." if the user starts to enter a legal number but never adds the expected digits. o A new driver, "TCP Listen Socket", has been added. The "Listen" driver allows a dL4 program to be a server for socket requests. For example, dL4 program S running on ServerA might use the "Listen" driver to open a listening socket on port 9631 of ServerA. Programs on other systems could then open sockets to port 9631 of ServerA to exchange data with program S. The "Listen" driver is used by opening a port number using the "Listen" driver: Open #1,":9631" As "TCP Listen Socket" The open will return immediately. To accept the next queued connection to that port, the program opens a socket using channel 1 as the parent socket: Open #2,{1} As "Socket" This open to channel 2 will not return until another program on the local or a remote system opens a socket to port 9631 of the local system. Once the open returns, channel 2 can be used to perform normal socket read and write operations to transfer data from or to the client program. When the transaction is finished, the server program closes channel 2 and performs another open against parent channel 1 to accept the next queued client request. The example program below provides a date and time service on port 9631. While the program is running, any telnet utility can be used to connect to port 9631 and receive the current date and time. The current date and time will be printed to the client once every ten seconds until the client closes the connection. Dim I$[100],3%,I Open #1,":9631" As "TCP Listen Socket" I = 0 Do Open #2,{1} As "Socket" I = I + 1 Do Try Print #2;"Session";I;Tim#(0);"\15\\12\"; Else Exit Do Try Read #2,-1,-1,100;I$ Else Rem If Spc(8) <> 123 Exit Do Loop Close #2 Loop If multiple clients attempt to open port 9631 at the same time, only one request will be accepted at a time. The other clients will be queued by the operating system until the current connection on channel 2 is closed. The client program will receive an error if the total number of queued requests exceeds an operating system defined number (usually a small number). Client programs should be prepared to retry opens if the server is busy. Normally, a null server name (":9631") should be used to open a listening socket on local system. The server name can be specified to open a listening socket on a specific network interface. The "opentime" option can be used to specify a maximum number of seconds to wait when opening a new queued connection: Open #2,{1,"opentime=10"} As "Socket" A record locked error (error 123) will be generated if the open times out. Lists of pre-defined TCP port numbers can be found at many web sites include www.iana.org. When writing a "listening" socket program, the port number should not conflict with a port number used by a needed or common pre-defined service. In most cases, the port number should be greater than 1023 to avoid standard port numbers. o A new SYSTEM statement mode has been implemented: SYSTEM 30 executes system commands in a hidden window. This hidden window eliminates the temporary command window created by the 'SYSTEM "command"' statement. The new mode syntax is: SYSTEM 30,CommandString$ SYSTEM 30,CommandString$,CommandStatus where "CommandString$" is a string literal, variable or expression and the optional "CommandStatus" is a numeric variable that receives the operating system execution status of the command. o A new special output macro can be defined in the "[OutputMacros]" section of a terminal or printer definition file. The "Illegal" macro can be used to define a single character to be output whenever an illegal output character is output. Example: [OutputMacros] Illegal=? o Enhancement: the socket driver now supports a "partial=" option to control whether a read terminates as soon as at least one character has been read (default behavior) or waits until the destination variable has been filled ("partial=true" behavior). This option is specified in the option field when opening a socket. Example: Open #1,"(partial=true)server:servicename" As "Socket" o Behavior change: the statement "INPUT TIM -1;String$" when used with "OPTION INPUT TIMEOUT SIGNAL OFF" no longer generates an input timeout error, it simply returns any available input characters into "String$". o Behavior change: the Windows printer driver now prints all supplied characters before reporting an illegal character error. o Two previously optional intrinsic CALLs, GetGlobals() and SetGlobals() are now standard CALLs and do not have to be installed using the development kit. o Enhancement: on Windows NT and Windows 2000 systems, the standard input and output file handles of scopec.exe and runc.exe can now be sockets. o Enhancement: Unicode character columns in Microsoft SQL Server 7.0 tables can now be accessed. Due to runtime library restrictions, the characters in those Unicode columns must be part of the ISO 8859-1 character set. o Enhancement: the default keyboard configuration now defines the shifted function keys as F13 through F24. For example, pressing the "F1" key while holding down the shift key will generate an 'F13' character. This change only effects the default configuration and will not add the additional function keys to an existing keyboard configuration (set if the Preferences->Keyboard menu item has been used). o Performance enhancement: the socket drivers now use Winsock 2 features to improve performance on systems supporting Winsock 2. o Beta bug fixed: the email driver would process multiple addresses incorrectly. o Beta bug fixed: the 'NR' and 'WD' mnemonics did not update the MSC(33) and MSC(40) function values (number of columns). o Beta bug fixed: text printed to the email driver after adding an attachment file corrupted the attachment. o Beta bug fixed: CLEARing a channel open to the email driver caused a 5 minute hang. o Beta bug fixed: normal and huge Indexed-Contiguous files could not be opened at the same time. o Bug fixed: if the debugger was entered when the main window was using a grid coordinate system other than '1GRIDFONT', the "?", "WF", "WS", and "WH" commands did not work correctly. o Bug fixed: using CALL PROGRAMDUMP() after using the debugger sometimes caused a memory violation. o Bug fixed: duplicate structure definitions (DEF STRUCT statements using the same structure name) were not reported as errors. o Bug fixed: using 'WD', 'NR', or font mnemonics sometimes caused a resource leak and eventually an error exit from scopew/runw. o Bug fixed: if the standard output handle was a socket, scopew/runw would sometimes hang. o Bug fixed: a socket driver read or write without a timeout sometimes waited forever even after I/O was complete. o Bug fixed: writing an empty string ("") to the raw file driver caused an error. o Bug fixed: FoxPro files created outside of dL4 with duplicate keys in a unique index could not have their index file rebuilt by the DCC_REBUILDINDEX channel command. o Bug fixed: the intrinsic CALL DateToJulian() did not work in modes 2 and 6. In addition, the CALL required a longer string than necessary in 2 digit year modes and permitted too short a string in 4 digit year modes. o Bug fixed: if protected characters and blinking characters were used together, the blinking area was not always cleared by the 'CS', 'XX', or other "clear" mnemonics. o Bug fixed: identity fields in Microsoft SQL tables are now ignored when performing a write to the table. o Bug fixed: indices with identify fields are not used as the preferred unique index. This eliminates a "unable to re-read record" error after updating a record. o Bug fixed: a selection in a list box or drop-down list box is reported immediately if the value changed option is used. o Bug fixed: GUI elements such as buttons sometimes returned incorrect values when selected or changed. o Bug fixed: if the table owner was specified when opening a table with the Microsoft SQL Full-ISAM driver, the open failed. o Bug fixed: selecting a value from a drop list of a GUI element was not reported when requested by the WCACTION mnemonic. o Bug fixed: if a FoxPro Full-ISAM file containing duplicate keys with trailing blanks was re-indexed using a third-party tool, a memory violation could occur when adding another duplicate key with trailing blanks. This problem was most likely to occur when the keys were completely blank. o Bug fixed: opening a network printer without using the printer driver ('OPEN #1,"\\server\printer"') returned a system error rather than "No such driver". o Bug fixed: a terminal or printer definition file that didn't define any characters within the "[OutputMacros]" section could cause a memory fault during output. o Bug fixed: the statement 'CHAIN ""' will successfully exit a program even if "OPTION CHAIN FAILURE IS ERROR" is used. o Bug fixed: using a font size larger than the window caused a memory violation. o Bug fixed: typing a RETURN while a paste area was selected and a input was active caused a memory violation. o Bug fixed: using "Copy" from the "Edit" menu sometimes caused an unnecessary and large increase in memory usage. o Bug fixed: a memory violation could occur if a SAVE command was executed after an immediate mode statement. Mar 10 2000 (Release 4.1.1) o Release 4.1.1 is a maintenance release that corrects various problems and adds two new intrinsic CALLs to access the Windows registry. o Two new intrinsic CALLs, GetRegistry() and PutRegistry(), have been added to provide access to the Windows registry. BASIC syntax: Call GetRegistry(KeyValuePath$, Value) Call PutRegistry(KeyValuePath$, Value) where: "KeyValuePath$" is a string variable or expression that specifies the registry key and value name to be read or written. Backslashes must be used to separate each key name in the path and the value name. The first key name must be one of the following special keys: "HKLM" or "Hkey_Local_Machine" "HKCU" or "Hkey_Current_User" "Value" is a numeric, string, or binary variable into which a value will be read or from which the value will be written. The type of "Value" must match the registry value (numeric for DWORD values, string for REG_SZ values, and binary for binary values). Example: Declare Intrinsic Sub GetRegistry, PutRegistry ! Write a string value into the registry current user key Dim KeyVal$[100], NewId$[100], Id$[100] KeyVal$ = "HKCU\\Software\\CompanyName\\Application\\UserId" NewId$ = "John Parker" Call PutRegistry(KeyVal$, NewId$) ! Read the value that was just written Call GetRegistry(KeyVal$, Id$) Print Id$ o The 'MH' (Move Home) mnemonic is now supported in edit boxes to move the current position to the beginning of the text in the box. o Behavior change: the intrinsic CALLs DateToJulian(), FormatDate(), JulianToDate(), and VerifyDate() now ignore spaces preceding numeric values rather than requiring zero filled values. o Bug fixed: the input focus was not moved to the current window if binary or activate-on-control-character input mode was used. o Bug fixed: the ProgramDump() intrinsic CALL did not report the current position correctly. o Bug fixed: scroll bars weren't enabled or disabled at appropriate times in multiline edit boxes ('WCEDIT' and 'WCTEXT' mnemonics). o Bug fixed: line, rectangle, and ellipse drawing could cross window boundaries. o Bug fixed: a bad character error occurred when a WINDOW OPEN statement was executed while using the character window driver rather than the standard GUI window driver. o Bug fixed: the MODIFY statement could apply, but not remove, read-only protection on files in Windows 95/98 systems. o Bug fixed: opening a directory path that ended with a backslash character failed on Windows 95/98 systems. Nov 17 1999 (Release 4.1) o A new Windows Terminal driver has been implemented to support graphical user interface programming. This driver will be the default window driver in dL4 4.1. The character oriented driver used in previous releases can be used by setting the runtime parameter WINDOWDEFAULTS to the string value "type=char". o The new Windows Terminal driver supports graphical user interface programming using the following new mnemonics: 'WCBUTTON' - Create button 'WCCHECK' - Create check box 'WCRADIO' - Create radio button 'WCNUMBER' - Create numeric input box 'WCSTRING' - Create character input box 'WCPRIVATE' - Create character hidden input box 'WCLABEL' - Create a label for an input box 'WCTEXT' - Create multi-line character display box 'WCMEMO' - Create multi-line character input box 'WCLIST' - Create selection list box 'WCEDITLIST' - Create editable selection list box 'WCLISTDROP' - Create drop down selection list 'WCEDITDROP' - Create drop down editable list box 'WCMENU' - Create menu 'WCMENUACTION' - Create menu action item 'WCMENUCHECK' - Create menu check box item 'WCMENURADIO' - Create menu radio button item 'WCMENUSEP' - Create menu separator 'WCENDMENU' - End menu or sub-menu definition 'WCGROUP' - Group graphical elements 'WCSELECT' - Select current graphical element 'WCENABLE' - Enable user input/selection to/of element 'WCDISABLE' - Disable user input/selection to/of element 'WCQUERY' - Request graphical element to send value 'WCDELETE' - Delete a graphical element 'WCACTION' - Change action performed by input element 'WCFOCUS' - Set current focus to selected element 'WCMARK' - Mark or select item 'WCUNMARK' - Unmark or unselect item 'WCSUBMENU' - Create submenu 'WCSETFONT' - Set font for controls Detailed documentation and example programs for these mnemonics can be found in the dL4 4.1 GUI Tutorial. The tutorial can be downloaded from www.unibasic.com. o The Windows Terminal driver improves the appearance of dL4 applications by creating all dL4 windows as separate operating system generated windows. Independent windows opened on separate channels (as in the statement , 'OPEN #1,{"Title","Style",w,h} As "Window"') have standard title bars and can be moved independently of the main window. Child windows, such as those created by the WINDOW OPEN statement, are created within the parent window and use optional dialog style borders. All dL4 windows support GUI programming mnemonics, mixing of multiple fonts or font sizes, and enhanced line drawing. o The new Windows Terminal driver implements an additional window style, "MODAL". A "MODAL" window disables the main window and any previously created modal window so that they can't be selected by the user. The user is thus required to work in the modal window until the window is closed by the application. When the modal window is closed, the previously active modal window is enabled or, if none, the main window is enabled. The "MODAL" style is ignored if applied to a child window (any window created with a parent channel specified or by the WINDOW OPEN statement). Example: OPEN #1,{"Help","TITL,SCRL,WRAP,MODAL",40,10} As "Window" o The new Windows Terminal driver implements an additional window style, "DIALOG". The "DIALOG" style creates a window that defaults to using the standard system dialog colors. A non-child window using the "DIALOG" style will also be modal. Example: OPEN #1,{"New Account","TITL,DIALOG",40,10} As "Window" o The 'FONTCOLOR', 'BACKCOLOR', and 'PENCOLOR' mnemonics have been enhanced to accept two special color codes in addition to RGB color values. Code -1 selects the standard system text color for dialogs. Code -2 selects the standard system background color for dialogs. For example, printing '-1FONTCOLOR' would select the system dialog text color as the current font color. These special color codes can be used to match the dialog color scheme selected by the user. o Two new mnemonics, 'BACTFN' and 'EACTFN', have been implemented to enable or disable activate-on-function-key input. When activate-on- function-key mode is enabled, an INPUT (or any read) from a terminal or window will be terminated by typing any function key or the normal "enter" keys. A function key is any keyboard sequence such as 'F4' or 'PAGE DOWN' that generates a mnemonic character as input data. Function keys such as 'INSERT' or "right arrow" that are used as edit control keys will not terminate input in this mode. The program can determine what character terminated an INPUT statement by using the KEY clause. Example: Print 'BACTFN'; Input Key TermChar$;"Prompt: "Response$ Print 'EACTFN'; If TermChar$ = 'F9' Goto DisplayHelp If TermChar$ = 'MU' Goto EditHistory o The coordinate grid in a window can now be changed from the default character grid to fractions of a character, inch, or millimeter. The 'GRIDFONT', 'GRIDENGLISH', and 'GRIDMETRIC' mnemonics are used to define the current coordinate grid. Please see the dL4 3.2 printer description below for a detailed description of these mnemonics. The current grid definition is used for column and row values returned by the MSC() function. Note that a screen inch or millimeter may not match an actual inch or millimeter. Each dL4 window has a separate coordinate grid definition. o Multiple fonts and font sizes can be mixed in a window using the 'FONTFACE' and 'FONTSIZE' mnemonics. Please see the dL4 3.2 printer description below for a detailed description of these mnemonics. Each dL4 window has a separate current font definition. o The LINE statement and related mnemonics can now be used to draw lines at any angle in a window. Previous versions of dL4 were restricted to horizontal or vertical lines. o The 'ELLIPSE' mnemonic can be used in a window to draw an ellipse bounded by a specified rectangle. For example, if the coordinate grid was defined in tenths of an inch ('100GRIDENGLISH'), the string '40,20,60,40 ELLIPSE' would draw a 2.0 inch circle centered at 5 inches from left and 3 inches down on the screen. o The 'PENWEIGHT' mnemonic can be used to set the thickness of lines drawn in a window. For example, using a one tenth character coordinate grid ('10GRIDFONT'), the string '2PENWEIGHT' would make the line width equal to one fifth of the character height. Each dL4 window has a separate current pen weight definition. o The 'PENSTYLE' mnemonic can be used to set the style of lines drawn in a window. A mnemonic argument of 0 (the default) selects solid lines, 1 selects dashed lines, and 2 selects dotted lines. As an example, printing '1PENSTYLE' selects dashed lines. Each dL4 window has a separate current pen style definition. o Spaces can now be used in filenames and directory paths. Such filenames and paths must be enclosed in quotes. Examples: save "program name with spaces" OPEN #1,"''Filename with Spaces''" Note that quotation marks in dL4 string constants are represented by two consecutive single quotes. Quoted filenames are supported by all statements, all commands, the LIBSTRING runtime parameter, and the LUMAP runtime parameter. o A new intrinsic function ENCFNM$() has been added to dL4 to add quotation marks to a filename if required. The function can be invoked with either one or two string arguments. With two arguments, the first argument will be treated as a directory prefix to be added to the second filename argument. o Portable Formatted or Portable Contiguous files larger than 2 gigabytes in size can now be created on Windows NT systems. Such files are built using the BUILD AS option to specify the "Portable Huge Formatted", "Portable Huge Contiguous", "Universal Huge Formatted", or "Universal Huge Contiguous" drivers. These are new file types using formatted or contiguous file behavior. "Huge" Indexed files will be supported in a future release of dL4. Example: Build #1,"[1:200]Filename" As "Portable Huge Contiguous" To share huge files across a network, both the file server and the client systems must support large files. Note: release 6 of UniBasic does not support "Universal Huge" files. o The "U" option letter ('BUILD #1,"[10:100]file"') can be used to select the "Universal" format when creating a Portable Formatted, Contiguous, or Indexed file. o A TCP/IP socket driver has been implemented. A connection can be created using an OPEN statement similar to: OPEN #c,"system:port" As "Socket" where "system" is a network system name or IP address (xx.xx.xx.xx) and "port" is a service name or port number. Character and binary data can be read or written. The following example program reads the current date and time from a Unix host system: 10 Dim L$[100] 20 Open #1,"unixhostname:daytime" As "Socket" 30 Read #1;L$ 40 Close #1 50 Print L$ o An OPTION DEFAULT statement has been added to dL4 to set options for all program units in a program module (file). o A new option, "DIALECT BITS", has been added to select the standard BITS options. The statement "OPTION DIALECT BITS" is equivalent to the following group of option statements: OPTION FILE ACCESS RAW,FILE UNIT IS BYTES,DISPLAY AUTO LF OFF OPTION CHAIN FAILURE IS ERROR,CLOSE FAILURE IS IGNORED OPTION IF BY STATEMENTS,INPUT TIMEOUT SIGNAL OFF,STRINGS RAW OPTION OPEN AUTO CLOSE ON,RETURN BY LINES Note that the arithmetic option, "BITS DECIMAL", is not set. Two additional options, "DIALECT IRIS" and "DIALECT STANDARD", have been added to select the "IRIS SUBSCRIPTS ON" or default options. o A new arithmetic option, "BITS DECIMAL", has been added to select BITS numeric types. Note that BITS numeric types are not portable. o A new option, "AUTO DIM OFF", has been added to aid in detecting misspelled variable names. When a program that uses "OPTION AUTO DIM OFF" is SAVEd, error messages will be generated for each variable that is not declared in a DIM statement, COM statement, CHAIN READ statement, or parameter list. A "-u" option has been added to the SCOPE CHECK command and LOADSAVE utility to detect undeclared variables in program that do not use the "AUTO DIM OFF" option. o The OPTION FLUSH AFTER STATEMENT ON option causes all write statements to flush the record buffer even if the statement does not unlock the current record. This option provides compatibility with programs that use ROPEN to read locked records and expect those records to contain updates that are currently in progress. This record flushing option is implemented for Formatted, Indexed Contiguous, and Full-ISAM files. Any driver that does not implement the DCC_SYNC operation will silently ignore this option. This option should only be used when necessary for compatibility with existing programs. o The OPTION RECORD LOCK TIMEOUT N option sets the default timeout period for file and database drivers. The number value N is the number of tenth seconds to wait before reporting a record lock error. The value of N must be between -1 (default, wait forever) and 36000 inclusive. This option should be used in converted programs that used the UniBasic LOCKRETRY feature. The option is supported by the Formatted, Indexed Contiguous, and Full-ISAM file drivers. Example: Option Record Lock Timeout 100 Dim S$[40] Open #1,"File" Read #1,3;S$ ! timeout not specified, will wait up to 10 seconds o The SYSTEM 28 statement has been extended to search a program defined application registry key for string values if those values are not in the environment. The application registry key is searched under HKEY_CURRENT_USER\Software and then HKEY_LOCAL_MACHINE\Software. The statement SYSTEM 29 is used to set the current application registry key. For example, the statements SYSTEM 29,"SupplierName\\AppName" V$ = "Parameter" SYSTEM 28,V$ would attempt to read the string value "Parameter" from the environment and then, if not found, the following registry locations: HKEY_CURRENT_USER\Software\SupplierName\AppName\Parameter HKEY_LOCAL_MACHINE\Software\SupplierName\AppName\Parameter Note that SYSTEM 28 does not access the registry unless SYSTEM 29 has been used to define a registry key. This mechanism provides a portable mechanism to access application parameters similar to that used for dL4 runtime parameters. o The command "RETURN" has been added to the debugger. This command causes execution to continue until the current procedure exits. o The command " GO" can now be used in the debugger to continue execution at a specific line. The line must be part of the current procedure. o A DCC_SYNC command has been implemented in the Portable Formatted driver to flush the record buffer without releasing the current record lock. A DCC_SYNC command can be issued by a user program via the CHANNEL statement ("Channel 20,#c;"). o The SAVE file revision has been changed from 2.8 to 2.11 in order to support new statements in dL4 4.1. Full upward compatibility is provided, so program files created by earlier versions of dL4 can still be used. Programs created by this release of dL4 cannot be used by earlier releases of dL4. o The maximize button of the main window now enlarges the window to the size of the canvas. o If installed from an administrator account of a Windows NT system, dL4 will be created as a common program group. o Behavior change: a CANCEL command is now automatically performed if required to perform an edit, RENUMBER, or LABEL command. A warning message is printed to inform the user that the program context has been deleted. Previous versions of dL4 simply displayed an error message and required the user to explicitly CANCEL the program. o Behavior change: the KILL statement and the SCOPE KILL command now delete unsupported file types as raw files rather than returning an error. o Behavior change: the background window created by a WINDOW ON or WINDOW OPEN statement is forced behind all other windows including those opened on channels (this is a change only for non-windowed terminals: dL4 for Windows, dL4Term, and "[Settings] StartupInWindow" terminals always followed this rule). o Three new drivers have been added to dL4 to create Universal Indexed Contiguous and Universal Formatted files. These drivers are variants of the Portable file drivers with character set, numeric maps, and other options set to match the format of Universal files. New driver names: "Universal Indexed-Contiguous" "Universal Formatted" "Universal Contiguous" o The ERRSET, ERRSTM, ESCSET, ESCSTM, INTSET, and related statements can now be used in external procedures. o Two new mnemonics 'LITNUL' and 'LITCR' have been defined. These mnemonics, if defined in a terminal or printer definition file, can be used to output 0x0000 and 0x000D characters without translation. o A new mnemonic, 'EUROSIGN', has been defined to represent the Unicode Euro currency character 0x20AC. o The Portable Indexed File and Universal Index File drivers now allow opening files created with an index block size of up to 2048 bytes (ISAMSECT equal to 16). A new runtime parameter, ISAMSECT, can be used to specify the index block size of newly created files as a multiple of 128 bytes. For example, an ISAMSECT value of 16 would cause new indexed files to use an index block size of 2048 bytes (16 times 128 bytes). The default index block size is unchanged and has a value of 1024 bytes (equivalent to an ISAMSECT value of 8). The new ISAMMAXSECT runtime parameter can be similarly used to change the maximum openable index block size of 2048 bytes to any multiple of 128. The default index block size should be adequate for all uses, but, if a different value is used, a power of 2 (4, 8, 16, 32, ...) is recommended. o Two new open options have been added to the Windows printer driver. The LANDSCAPE and PORTRAIT options, which accept a boolean value, are used to specify page orientation. The value will override the printer default or user selected orientation. The options are ignored if the Windows printer driver does not support selection of orientation. SELECTLP.BAT modified to request landscape orientation: rem dl4opts=openas=selected page printer,landscape=true rem rem dL4 selected by dialog printer script modified to request rem landscape orientation SELECTLP.BAT modified to request portrait orientation: rem dl4opts=openas=selected page printer,portrait=true rem rem dL4 selected by dialog printer script modified to request rem portrait orientation o The WIDTHI, WIDTHM, LENGTHI, LENGTHM, and FORMCODE options can now be used with all versions of the page printer driver. Note that the options will have no effect unless they are supported by the Windows operating system printer driver. o The "Page Printer" driver now supports the graphics characters ('Gn') when using standard Windows 95 fonts (the Windows NT fonts always supported graphics). o In the "Preferences->Font" dialog, the BOLD style can be selected as the standard font. Using the BOLD style as the default font may make bold characters ('BBOLD') identical to non-bold characters. o Behavior change: the READRECORD and WRITERECORD statements now obey the FILE ACCESS RAW option. o Beta behavior change: creating a graphical element (for example, using 'WCBUTTON') with the same element number as an existing element now overwrites the old element rather than returning an error code. Overwriting any part of a menu will cause the entire menu to be deleted. o Beta behavior change: the 'XX' mnemonic now deletes all graphical elements on a window including menus. o Fix bug: the Microsoft SQL Full-ISAM driver updated incorrect rows if a table had a clustered index and at least one non-unique index. o Fix bug: PCHR$() ignored any parameters preceding a string value. o Fix bug: the LOADSAVE "-l" OSN option ignored illegal OSN indices and, on some platforms, caused memory violations when valid OSN indices were specified. Note that the "-l" option uses an OSN index and not an actual OSN number. o Fix bug: the printer driver incorrectly printed graphic characters with repeat counts ('5GH'). o Beta bug fixed: the socket driver now translates numeric IP addresses without first attempting a name lookup. o Beta bug fixed: the socket driver reported some open errors incorrectly as BE_SYSERRNO. o Beta bug fixed: binary input ('IOBI') did not work on non-dL4Term terminals. o Beta bug fixed: output of a character with more parameters than the maximum number of supported parameters sometimes caused a memory fault. o Beta bug fixed: the root window was always sized to the canvas rather than window size. o Beta bug fixed: blinking text on a parent window was visible in any overlapping child window. o Beta bug fixed: repeat counts ('5GH') were ignored when used with printable characters. Jun 18 1999 (Maintenance release 3.2.1) o Release 3.2.1 is a maintenance release that corrects a problem in the Windows printer driver and adds some additional printer open options. o A bug in the Windows printer driver that caused the font size and other font characteristics to return to their default values after each new page has been fixed. o Five new open options have been added to the Windows printer driver. The WIDTHI, WIDTHM, LENGTHI, and LENGTHM options can be used to specify the page length in inches or millimeters. The FORMCODE option can be used to specify a numeric page size form code. The effects of these options vary depending on the Windows printer driver used for output. The options should not be used unless necessary and values should be chosen to match forms supported by the target printer or printers. These options can only be used with the Windows default or user selected printer driver. SELECTLP.BAT modified to request legal form paper: rem dl4opts=openas=selected page printer,widthi=8.5,lengthi=14 rem rem dL4 selected by dialog printer script modified to request rem use of 8.5 inch wide by 14 inch long legal forms. SELECTLP.BAT modified to request 14 7/8 by 11 paper: rem dl4opts=openas=selected page printer,formcode=39 rem rem dL4 selected by dialog printer script modified to request rem use of 14 7/8 inch wide by 11 inch long fanfold forms. Common page size codes for use with the FORMCODE option: 1 Letter 8 1/2 x 11 in 2 Letter Small 8 1/2 x 11 in 3 Tabloid 11 x 17 in 4 Ledger 17 x 11 in 5 Legal 8 1/2 x 14 in 6 Statement 5 1/2 x 8 1/2 in 7 Executive 7 1/4 x 10 1/2 in 39 US Std Fanfold 14 7/8 x 11 in Jan 26 1999 (Release 3.2) o The new page printer driver makes it possible to output to any Windows printer. The driver can be opened to a specific printer name, to the system default printer, or, via a dialog box, to a user selected printer. Because Windows is performing all low level formatting, the driver does not require any device specific configuration such as a printer definition file. The printer can even be a fax service if a Microsoft or third party fax driver has been installed as a printer. The page printer driver uses a page oriented rather than line oriented output model. Programs can use cursor positioning ("@x,y") to output anywhere on the current page. The page is not printed until a line scrolls off the bottom of the page, an 'FF' or 'CS' mnemonic is output, or the driver is closed. Both forms ("@x;" and "@x,y;") of absolute cursor positioning use grid units. The default grid is the traditional character row and column, but it can also be set to be in inches or millimeters. The grid definition is controlled by the 'GRIDENGLISH', 'GRIDMETRIC', and 'GRIDFONT' mnemonics. Each of these mnemonics take a single numeric parameter that determines the resolution of the grid. Column zero and row zero of the grid are always defined to be the upper left corner of the printable area of the page (the printable area does not include any unprintable margin space). 'GRIDENGLISH' Set the coordinate grid to thousandths of an inch times the parameter ('nGRIDENGLISH') from the upper left corner. The mnemonic string '100GRIDENGLISH' sets the grid to tenths of an inch and so the cursor position "@35,51" would position to a point 3.5 inches to the right and 5.1 inches down from the upper left corner. 'GRIDMETRIC' Set the coordinate grid to hundredths of a millimeter times the parameter ('nGRIDMETRIC') from the upper left corner. The mnemonic string '1000GRIDMETRIC' sets the grid to centimeters and so the cursor position "@6,10" would position to a point 6 centimeters to the right and 10 centimeters down from the upper left corner. 'GRIDFONT' Set the coordinate grid to the line height and average character width of the current font divided by the parameter ('nGRIDFONT') from the upper left corner. The mnemonic string "10GRIDFONT" sets the grid to tenths of the line height and character width. The cursor position "@105,75" would position to 10.5 columns to the right and 7.5 lines down from the upper left corner. Note that the grid is based on the current font and will not change if the font size is changed unless another 'GRIDFONT" mnemonic is output. When using variable width fonts, the column size is based on the average character width. The current font can be changed by using the 'FONTFACE' mnemonic. This mnemonic has a single string parameter which is the font name such as "Courier" or "Helvetica". A mnemonic string parameter is generated by using the PCHR$() function with a string argument. The font size is controlled by the 'FONTSIZE' mnemonic which has a numeric argument specifying the size in grid units. Assuming the grid is defined in characters (the default), then the statement: PRINT #1;PChr$("Helvetica");'Fontface 3Fontsize'; would select "Helvetica" as the current font sized at three times the row height for the printer on channel 1. If the printer does not support "Helvetica", an error may occur, but usually the Windows printer driver will choose a substitute font. Character sizing is approximate and determined by Windows algorithms. The font determines not only the appearance of characters, but also which characters can be printed and how they are positioned. Most Windows fonts are of variable pitch and so different characters will have different widths. If characters, particularly spaces, are used for exact positioning, then a fixed pitch font should be used. 'FONTFACE' Set the font to the specified font name. The font name must be specified as a string parameter using the PCHR$() function as in the following statement: PRINT #1;PCHR$("Times");'FONTFACE' 'FONTSIZE' Set the font size to the parameter ('nFONTSIZE') times the grid height unit. The printer driver supports drawing lines and rectangles. All drawing is performed using the current "pen" whose width and color is set by the 'PENWEIGHT' and 'PENCOLOR' mnemonics. The example below draws a three inch by four inch rectangle with a line drawn between the upper left and lower right corners: ! Select a tenth inch grid Print #1;'100GridEnglish'; ! Set the pen color to blue with a width of .2 inches Print #1;'255PenColor 2PenWeight'; ! Draw 3 by 4 inch rectangle Box #1;@10,10;To @50,40; ! or Print #1;'10,10,50,40Rect'; ! Draw a line between the corners Line #1;@10,10;To @50,40;! or Print #1;@10,10;'50,40LineTo'; 'PENCOLOR' Set the pen color to the parameter ('rPENCOLOR') where the parameter is an RGB color value. 'PENWEIGHT' Set the pen width to the parameter ('nPENWEIGHT') times the grid unit. 'LINETO' Draw a line using the current pen using the current position as one point and the specified coordinates ('x,yLINETO') as the ending point. 'RECTTO' Draw a rectangle using the current pen using the current position as one corner and the specified coordinates ('x,yRECTTO') as the opposite corner. 'RECT' Draw a rectangle using the current pen and the specified coordinates ('x1,y1,x2,y2RECT'). 'ELLIPSE' Draw an ellipse using the current pen to fit the rectangle defined by the specified coordinates ('x1,y1,x2,y2ELLIPSE'). The following mnemonics are used to change the current position on the page or print the current page: "@x;" Position to grid column x "@x,y;" Position to grid column x and grid row y 'MH' Move to upper left corner of page 'MR' Move right one average character width 'ML' Move left one average character width 'BS' Move left one average character width 'RI' Move up one line 'BK' Move to column zero 'CR' Move to column zero of the next line 'LF' Move to current column on the next line 'MD' Move to current column on the next line 'FF' Print current page and move to the upper left corner of the next page. 'CS' Print current page and move to the upper left corner of the next page. The following mnemonics are used to change attributes of the current font: 'BI' Print in italic mode 'EI' End italic mode 'BSO' Print in strike out mode 'ESO' End strike out mode 'BU' Print in underline mode 'EU' End underline mode 'BBOLD' Print in bold mode 'EBOLD' End bold mode 'BSUB' Print in subscript position relative to the current font height 'ESUB' End subscript mode 'BSUP' Print in superscript position relative to the current font height 'ESUP' End superscript mode 'BC' Print in compressed mode (.6 times default font size) 'EC' End compressed mode 'BX' Print in expanded print mode (twice default font size) 'EX' End expanded print mode The following mnemonics are used to change the current font and background colors: 'GN' Set font color to green 'RE' Set font color to red 'YE' Set font color to yellow 'BL' Set font color to blue 'MA' Set font color to magenta 'CY' Set font color to cyan 'WH' Set font color to white 'BLACK' Set font color to black 'FONTCOLOR' Set the font color to the parameter ('rFONTSIZE') where the parameter is an RGB color value. 'BACKCOLOR' Set the background color to the parameter ('rBACKCOLOR') where the parameter is an RGB color value. 'RESETCOLOR' Reset font, pen, and background color to default By default, the printer driver uses the "Courier New" font with a size of 1/6 inch. The default font and size can be changed by using the "FONT=name" and "FONTSIZE=size_in_points" open options. The following OPEN statement sets the default font to "Arial Narrow" with a size of 10/72 inches: OPEN #1,{"","FONT=Arial Narrow,FONTSIZE=10"} As "Default Page Printer" The printer driver can be opened to a specific Windows printer name, to the default Windows printer, or to a printer selected by the user in a dialog box. To open a specific printer, use the "Page Printer" driver: OPEN #1,{"Printer Name","options") As "Page Printer" To open the default Windows printer, use the "Default Page Printer" driver: OPEN #1,{"","options") As "Default Page Printer" To allow the user to select the printer in a dialog box, use the "Selected Page Printer" driver: OPEN #1,{"","options") As "Selected Page Printer" A standard Windows printer selection dialog box will displayed so that the user can select a printer. If the user cancels the dialog, a "File not found" will occur. In all three drivers, a "File not found" error will be generated if the printer does not exist. o The Page Printer driver provides three special GET statement commands to retrieve the current page size and margins. All three commands return a value of -1 for unknown values. The statement GET #c,-1399;Width,Height returns the width and height of the printable area of a page in the units of the current coordinate grid. The statement GET #c,-1398;Left,Right returns the left and right margins of the page in the units of the current coordinate grid. The statement GET #c,-1397;Top,Bottom returns the top and bottom margins of the page in the units of the current coordinate grid (see the GRIDENGLISH, GRIDMETRIC, and GRIDFONT mnemonics in the Page Printer driver description above). These commands can only be used on a channel open to a Page Printer driver. o Two new channel functions, CHF(1200+c) and CHF(1300+c), have been defined to return the current column and row positions. The values are returned in the units of the current coordinate grid (see the GRIDENGLISH, GRIDMETRIC, and GRIDFONT mnemonics in the Page Printer driver description above). o A new driver, "Serial Terminal", has been added to allow programs to open serial communication devices to a Window class driver. Using this driver, input and output to a serial device will follow the same rules as screen and keyboard I/O. By default, end of line characters will terminate input, input edit characters such as backspace will be processed, and data characters will be echoed. The standard 'IOxx' mnemonics can be used to control input characteristics. Similarly, cursor positioning can be used on output if mnemonics are defined in a terminal definition file. The "Serial Terminal" driver accepts the options listed below when opened: Option Argument Use TERM Filename or path Specify terminal definition file to be used with device SPEED Numeric ("9600") Set device dependent line speed DATA String ("8n1", "7e1") Set device dependent data format CTSFLOW Boolean ("T" or "F") Enable CTS output flow control DSRFLOW Boolean ("T" or "F") Enable DSR output flow control RTSFLOW Boolean ("T" or "F") Enable RTS input flow control XONFLOW Boolean ("T" or "F") Enable XOFF/XON output flow control If not specified, all options except TERM use the current system default value of the device. If the TERM option is not specified, the driver uses a simple default terminal definition in which carriage return is recognized as an input terminator. Example: F$ = "(speed=38400,data=8n1,term=c:\dl4\term\vt100)com1" Open #1,F$ As "Serial Terminal" o The pipe driver has been extended to allow redirection of I/O to a specified driver. "OPENAS=name" or "BUILDAS=name" options can be placed in the script "dl4opts" line to specify that an open of the script should cause an OPEN or BUILD using the driver "name". The options "PATH=string" and "OPTIONS=string" can be used to specify the path or options value to be used by the OPEN or BUILD. For example, the statement 'OPEN #2,"$printer"' opens the script "printer.bat" for output on channel 2. If "printer.bat" begins with the line: rem dl4opts=openas=default page printer then output to channel 2 would be directed to the default Windows printer. o Two printer scripts, dfltlp.bat and selectlp.bat, are now supplied and installed with dL4. The default Windows printer can be opened as "$dfltlp". A user selected Windows printer can be opened as "$selectlp" which will cause a printer dialog to be displayed. Examples: OPEN #2,"$dfltlp" OPEN #99,"$selectlp" o The new ForcePortDump() intrinsic CALL causes a target port to abort execution of the current dL4 program, produce a dump listing file, and then exit from dL4. For debugging purposes, it is also possible to trigger a dump listing without causing the program to exit. The dump output is identical to that of the ProgramDump() intrinsic CALL and lists the current execution location of the target program, the CALL stack, current variable values, the status of open channels, and various other values. Under Unix, the caller of ForcePortDump() must either be the same user as that of the target port or be a privileged user such as root. BASIC syntax: Call ForcePortDump(Mode, PortNumber, Status) where: "Mode" is a numeric variable or expression that controls the type of dump produced. If "Mode" is zero, the target port will be requested to produce a dump and then exit. If "Mode" is equal to one, the port will be requested to produce a dump and then continue (this should only be used for debugging because it will interrupt any I/O in progress). "PortNumber" is a numeric variable or expression containing the port number of the target dL4 program. "Status" is a numeric variable that receives the status of call. The value of "Status" will be set as follows by any call that doesn't generate an error 38: 0 Successful, the selected port exists and a dump command was sent to the port. This status does not guarantee that the port actually aborted or generated a dump file. 1 Error, the specified port does not exist. All parameters are required. Error 38, "Error detected by CALLed subroutine", will be generated if an incorrect number of parameters, parameter type, or parameter value is passed to ForcePortDump. To limit attacks on system security, the dump output is controlled by the DL4PORTDUMP runtime parameter. If DL4PORTDUMP is not defined for the target port, then ForcePortDump() will not generate a dump. On Unix, DL4PORTDUMP is an environment variable that must be set in each users environment (perhaps set by the .profile script). Under Windows, the DL4PORTDUMP value can be supplied either as an environment variable or as a string value in the registry: HKEY_CURRENT_USER\Software\DynamicConcepts\dL4\Environment\dL4PortDump HKEY_LOCAL_MACHINE\Software\DynamicConcepts\dL4\Environment\dL4PortDump In any form, DL4PORTDUMP is the filename to which the dump will be written. DL4PORTDUMP must be an absolute path; for example, under Windows, DL4PORTDUMP might be defined as "D:\Dumps\DumpFile.txt". The following macro values can be used in a DL4PORTDUMP path string: %PORT% Port number of target port %DATE% Current date ("YYMMDD") %TIME% Current time ("HHMMSS") %name% Value of environment variable "name" These macro values, if used in the DL4PORTDUMP path, will be replaced by their current values. For example, if DL4PORTDUMP was defined with the value "D:\Dumps\%PORT%.txt" and a dump was triggered on port 15, then the dump would be written to the file "D:\Dumps\15.txt". o The ProgramDump() intrinsic CALL has been enhanced to use the DL4PORTDUMP runtime parameter, as described above, if the filename parameter is not specified. o A new command has been added to the BASIC mode of SCOPE. The command "PDUMP filename" outputs a ProgramDump() style listing of the current program status to "filename". o A new mode has been added to the PORT statement. PORT mode 5 returns the current line number and library name executing on a specified port. For example, the statement: PORT P,5,S,L$ will return in L$ the current line number of the program running on port P. If the program is executing a line in a library, then L$ will have the format "library:line#" where "library" is the name of the library. As with PORT mode 3, a status is returned in S indicating success (zero) or failure (one, port not attached). o The following intrinsic calls have been added: Call AvPort(PORTNUM {,MINPORT {,MAXPORT}}) Call CheckDigits(STRING$) Call CheckNumber(STRING$) Call ConvertCase(MODE, STRING$ {,START}) Call DateToJulian({MODE,} DATE$ {,CONVERTED_DATE$ {,STATUS}}) Call DecToOct(NUMBER, OUTPUT_NUMBER_OR_STRING_VARIABLE) Call Echo(MODE) Call FindF(PATH$, STATUS) Call FormatDate(DATE$ {,CONVERTED_DATE$ {,STATUS {,MODE}}}) Call JulianToDate({MODE,} JULIAN$ {,CONVERTED_DATE$ {,STATUS}}) Call MiscStr({M,}S${,...}) Call ReadRef(CHAN, MODE) Call Rename(LU, OLDNAME$, NEWNAME$, CHANNEL, STATUS) Call String(MODE,...) Call StringSearch({F,}A${,S},T$,P{,N{,S1{,T1}}}) Call Time(T$) Call VerifyDate(DATE$ {,CONVERTED_DATE$ {,STATUS {,MODE}}}) These calls are UniBasic compatible and replace all of the functions in the oldcalls.bas and depcalls.bas libraries of dl4.samples except for CALL DYNWIND(). The date oriented CALLs, like all other dL4 date functions, use "OPTION DATE FORMAT NATIVE" and the native operating system locale configuration (such as the LANG environment variable) instead of the UniBasic "EUROPEAN" and "DATESEP" environment variables. In all programs that use oldcalls.lib or depcalls.lib, each occurrence of "DECLARE EXTERNAL SUB" must be changed to "DECLARE INTRINSIC SUB" for the new calls. In addition, any "EXTERNAL LIB" statement for oldcalls.lib or depcalls.lib should be removed, or, if CALL DYNWIND() is needed, all of the new intrinsic calls should be deleted in oldcalls.lib. For example, in a program that used the DATETOJULIAN and JULIANTODATE calls, the lines: Declare External Sub DateToJulian,JulianToDate External Lib "OLDCALLS.LIB" would be changed to: Declare Intrinsic Sub DateToJulian,JulianToDate Programs that are not changed will run, but they will continue to use the procedures in oldcalls.lib or depcalls.lib. Any conversion profile ("convert.prf") should be changed to use the new intrinsic calls. o The record number -4 has been defined in the text file driver to position to the end of the file. A program can append to a text file with a statement such as this: PRINT #1,-4;"message" o The SCOPE DUMP command has been extended to support output to the pipe driver. The command "DUMP $name" will list the current program to the pipe device "$name". o The 'IOCI' (clear typeahead buffer) mnemonic is now supported for dL4 sessions using serial devices as standard input or output. o A new window driver registry value "ProtectedNotDim" has been added to control whether protected characters are displayed with the "DIMmed" attribute. Disabling the "DIMmed" attribute makes it possible to fully control the color of protected characters using the normal color mnemonics such as 'BL' or 'FONTCOLOR'. This feature can be configured using the "Window" dialog of the "Preferences" menu. o A new window driver registry value "TabBySpacing" has been added to control whether the PRINT TAB() function clears intermediate characters to spaces while moving to the specified position. This feature can be configured using the "Window" dialog of the "Preferences" menu. o The 'IOTE' (toggle echo) mnemonic is now supported in dL4 windows. o Behavior change: when writing strings with the raw file driver, any 'ALIGN' or 'MOVETO' mnemonics are now expanded before performing the write. This supports the use of TAB and comma field separation in PRINT statements to the raw file driver. o Bug fixed: the LET command in the debugger ignored string subscripts if the first subscript was one. Thus, the command 'LET A$[1,1]="X"' was treated as 'LET A$="X"' replacing the string value rather than just the first character. o Bug fixed: if I/O was interrupted, the raw file driver entered a tight loop until the I/O completed. o Bug fixed: pfilter would fail if an OPEN and CLOSE of a pipe occurred without any output and a CLOSE string was defined in the printer definition file. o Beta bug fixed: the left and top margins used by the Page Printer driver were incorrect. o Beta bug fixed: the argument order of the intrinsic CALL READREF was reversed. o Beta bug fixed: PORT mode 5 sometimes returned a very large line number if the program on the selected port had exited. o Beta bug fixed: intrinsic CALL STRINGSEARCH would fail to find a match if the match occurred at the very end of the dimensioned size of the source string. Nov 9 1998 (Release 3.1.1) o Two new standard intrinsic functions, MD5? and AddMD5?, has been added to dL4. MD5?() returns the MD5 checksum code of the first argument which must be either a binary or a string variable. The MD5 checksum is returned as a 16 byte binary value. An optional second binary argument can be used to pass an intermediate value from AddMD5?(). This allows a combined checksum to be calculated. Checksums are calculated against the DIMed size of strings so that null (0) characters can be included in the checksum. To avoid this, simply pass the string with subscripts. So that string values will produce the same checksums on all platforms, each UNICODE character of a string is forced into a most-significant-byte first ordering for calculation. BASIC syntax: Dim chksum?[16], intermediate?[128] chksum? = MD5?(var) chksum? = MD5?(var,intermediate?) intermediate? = AddMD5?(var) intermediate? = AddMD5?(var,intermediate?) o Several open options have been added to the RAW driver for use with serial devices as shown below: Option Argument Use SPEED Numeric ("9600") Set device dependent line speed DATA String ("8n1", "7e1") Set device dependent data format CTSFLOW Boolean ("T" or "F") Enable CTS output flow control DSRFLOW Boolean ("T" or "F") Enable DSR output flow control RTSFLOW Boolean ("T" or "F") Enable RTS input flow control XONFLOW Boolean ("T" or "F") Enable XOFF/XON output flow control For example, the statement OPEN #1,"[1:1](speed=19200,data=8o1,xonflow=t)COM1" As "Raw" would open the COM1 serial port at 19200 baud with 8 bit characters, odd parity, 1 stop bit, and XON/XOFF output flow control. o MSC(43) has been defined and implemented as returning the current screen row. o SPC(19) now returns a license value as a 32-bit number instead of -1. In the current implementation, the license value is the license number. o Behavior change: if an OPEN fails because a file header is locked, the error "File is open elsewhere" will be returned instead of "Illegal driver operation". o Bug fixed: after a screen area was selected with the mouse, input into that area was truncated. o Bug fixed: the pipe driver would sometimes return a "Driver resource exhausted" error when a non-existent script or program was opened under Windows 95/98. o Bug fixed: dL4 sessions could not be evicted or interrupted if a read from a serial port was in progress. o Bug fixed: an error while evaluating a single line function would not trigger error handling and could cause an address violation. o Bug fixed: repeatedly CHAINing or CALLing to a program using a "./" or "../" in the program filename caused the filename to exceed the filename length limit and the CHAIN/CALL to fail because the program could not be found. All "./" and "../" strings are now removed from paths for all program and data file access after properly adjusting the paths. o Bug fixed: CLOSE/CLEAR statements using the RAW driver would sometimes pause for 5 seconds. o Bug fixed: OPENing a printer script immediately after CLOSEing it sometimes caused loss of output data. o Bug fixed: record zero in a Portable Indexed Contiguous file, once deallocated, could not be reallocated. o Bug fixed: deallocating non-existent records in a Portable Indexed Contiguous file sometimes caused the COUNTUSED option to be disabled. o Bug fixed: paths using ":" as a directory separator were not mapped correctly by LUMAP. o Bug fixed: opening a non-directory using the directory driver did not generate an error. Mar 20 1998 (Release 3.1) o This release requires an SSN authorized for release 3 of dL4. Without such an SSN, dL4 can only be used in single user demo mode. o The SAVE file revision has been changed to 2.8 in order to support new features of dL4 3.1. A new program file format also significantly lowers program load overhead. Full upward compatibility is provided, so program files created by earlier versions of dL4 can still be used (programs saved by dL4 2.3.1 and earlier will not, however, be placed in the local cache). Programs created by this release of dL4 cannot be used by earlier releases of dL4. o CALL-by-filename ('CALL "filename"'), CHAIN, and SWAP will reuse any library or program files that are shared with the parent program. For example, if a parent program uses "oldcalls.lib" and CALLs a subprogram that also uses "oldcalls.lib", then a single copy of "oldcalls.lib" will be shared between the parent program and the subprogram. Library and program files will NOT be shared unless the files have been SAVEd (or LOADSAVEd) in the new program file format. o An OSN (OEM Security Number) based form of program protection has been added to dL4. This protection mechanism is very similar to the PSAVE method in UniBasic. A program saved with the PSAVE command can be loaded only on systems that have been authorized with a developer supplied OSN. Any attempt to run protected programs on an unauthorized system will cause as error 265, "Not licensed to load or create this program". PSAVE protected programs can be modified and re-SAVED on any authorized system, but they can be listed only on systems which have been authorized with a master OSN. The ProgramDump intrinsic can be used in protected programs and any errors that occur while attempting to list a source line will be ignored (variables names can always be listed) The dl4 PSAVE mechanism differs from that of UniBasic in two ways: 1. There is no "-o" startup option to add new OSNs. Instead, use the standard REGEDIT or REGEDT32 utilities to add OSN string values to this registry key: HKEY_LOCAL_MACHINE\Software\DynamicConcepts\Passport\OSN If this key does not exist, it must be created. Each OSN value is a string (REG_SZ) value in which the value name is the company/product name and the value is the OSN key. 2. There is no "-t" startup option to add a temporary OSN. A temporary OSN is instead added by using the SCOPE "OEM TEMP" command which will prompt for an OSN that will be used only by the current SCOPE session. OSNs are created with the makeosn utility that is supplied as part of Passport version 2.1. This version of Passport is included in the dL4 installation program. A PDN (Product Description Number) is required to use makeosn. OSNs may also be created using the Unix version of makeosn. Please contact the Dynamic Concepts Sales department for information on how to obtain a PDN. To support this protection method, two new commands have been added to SCOPE: OEM and PSAVE. The OEM command lists the currently authorized OSNs. If the TEMP option is used ("OEM TEMP"), the OEM command will first prompt for a temporary OSN to be used only by the current SCOPE session. The OEM command can be used in the SCOPE command, BASIC, and debug modes. The PSAVE command is used to create OSN protected programs. The PSAVE command is identical to the SAVE command except for an optional OSN number that can precede the SAVE filename. For example, the command "PSAVE 2,menu" would save the current program as "menu" after protecting it to require the second OSN listed by the OEM command. Protected programs can be created only if the specified OSN is a master OSN. The PSAVE command is available in the SCOPE command and BASIC modes. A new option, "-l n", has been added to the SCOPE SAVE command and to the LOADSAVE utility to create OSN protected programs. The value "n" is the number of a master OSN as listed by the SCOPE OSN command. o This release includes two new executables: runc.exe and scopec.exe. These are console versions of scopew and runw for use in CGI programs and other special uses. The console versions differ from scopew and runw in that all "screen" I/O is performed via standard input and output, by supporting redirection of standard input and output, in the use of a console interface instead of an independent window, and in the names of the frontend programs (scopec and runc instead of scopew and runw). As in dL4 for Unix, the environment variables TERM and TERMDIR should be set to select the filename and directory of a dL4 terminal definition file. The TERM and TERMDIR values may also be specified in the registry under either of the following keys: HKEY_CURRENT_USER\Software\DynamicConcepts\dL4\Environment HKEY_LOCAL_MACHINE\Software\DynamicConcepts\dL4\Environment Sample terminal definition files can be found in the installation directory in the subdirectory TERM. While scopec and runc can be used directly from a DOS command prompt, very little screen control is possible because the Win32 console provides only minimal interpretation of control characters. o To add custom CALLs or drivers to scopec or runc, use the standard dL4 for Windows development kit. The console and GUI versions of dL4 differ only in the front end programs and in their use of dL4 drivers. Both versions share the same runtime libraries (dl4rt.dll and dl4basic.dll). o The new runtime parameter LUMAP adds a mechanism to map relative file paths. The LUMAP value consists of one or more space separated value pairs. Each pair consists of a logical directory name, an equals sign ("=") character, and an absolute path. Whenever a relative filename is used, the LUMAP will be searched for a logical directory name that matches one or more leading directories names of the relative filename. Leading zeroes in an all numeric directory name are ignored. If a match is found, the matched portion of the relative filename will be replaced with the absolute path from LUMAP. For example, given an LUMAP value of: "5=M:\usr\accounting Mail=D:\Mail" the following filenames would be translated as shown: 5/filename -> M:\usr\accounting\filename 005/filename -> M:\usr\accounting\filename Mail/filename -> D:\Mail\filename x/5/filename -> x/5/filename ("x" isn't in LUMAP) Functions such as CHF$(800+c) reverse this mapping to return the logical filename. Using the LUMAP shown above, if "5/abc" was opened on channel 2, the actual file opened would be "M:\usr\accounting\abc", but CHF$(802) would return "5/abc". If more than one logical directory is mapped to the same actual directory ("5=T:\acct 6=T:\acct"), then the reverse mapping will map all occurrences of the actual directory to just one of the logical directories. CHF$(800+c) and similar functions perform reverse mapping on all filenames even if the original filename used an actual rather than a logical directory name. Filename mapping is applied to both data and program filenames. Mapping is applied to program filenames before the LIBSTRING directory list is searched. If a program filename contains a mapped logical directory, the filename will be converted to an absolute path and LIBSTRING will not be used. While the intended use of LUMAP is to support logical unit numbers and logical directory names, it is also possible to map multiple leading directories ("Mail/Fred=N:\Mail\Barney") or entire filenames. The only recommended use of such substitutions is to translate Windows reserved names such as LPT1 to usable, non-reserved filenames. For example, the map "LPT1=D:\dL4\Printers\Printer1.bat" would make it possible to use "$LPT1" as a printer name even though "LPT1" is a reserved filename under Windows. Translation of data or program filenames is not recommended, but it is legal and supported. o The ROPEN statement has been redefined to open files with locking disabled in addition to the previous read-only access. ROPEN is thus equivalent to 'OPEN "filename"'. This new feature permits an application to read records that are currently locked by other processes. This form of open is supported by the Portable Formatted, Portable Indexed Contiguous, and FoxPro Full-ISAM drivers. Note: reading records that are currently locked may return partially updated or inconsistent data. o The Portable Formatted and Portable Indexed Contiguous drivers have been modified to support reading through locked records on both Unix and Windows. The required changes to the locking protocol are incompatible with previous versions of dL4. Older versions of dL4 should not be used to access files at the same time as this or later releases of dL4. o The Portable Formatted, Portable Contiguous, and Portable Indexed Contiguous drivers now support exclusive opens via the "E" access mode ('OPEN #c,"file"') or the EOPEN statement. An exclusive open will succeed only if the file isn't currently open by another dL4 3.1 user. An error 76 will be returned if another user has the file open in either shared or exclusive mode. Once opened in exclusive mode, a file cannot be opened by other dL4 users. o The default value of ISAMFILES has been increased from 40 to 50. o A DCC_SYNC command has been implemented in the Portable Index Contiguous driver to flush the record buffer without releasing the current record lock. A DCC_SYNC command can be issued by a user program via the CHANNEL statement ("Channel 20,#c;"). o A new option, "NUMMAP", has been added to the Portable Contiguous and Portable Indexed Contiguous file drivers to support converting from UniBasic to Portable Contiguous files. The "NUMMAP" option has two possible values: "IEEE" (the default) and "IRIS" (to use IRIS BCD number formats). This option can be used as shown below with the "CHARSET" option to create a Portable Contiguous file that uses the IRIS BCD number formats and the IRIS character set: BUILD #c,"(nummap=Iris,charset=Iris)[n:l]filename" If a file is built this way, records can be copied directly from a UniBasic contiguous file by reading and then writing the entire record using a binary variable. The UniBasic file must contain only IRIS character and IRIS BCD numeric data. This conversion does NOT support copying packed fields because they contain inherently untranslatable binary data. o The pipe driver has been extended to support printing directly to a device without running a separate "pfilter" process. This feature makes it easier to debug printer scripts because most configuration errors are reported immediately to the OPEN statement. To use direct printing, the printer script must specify an "output" option to select the output device and a "translate" option to select a printer definition file path. For example, the following script outputs to the device LPT1 after translating output using the printer definition file "c:\dl4\printers\hplj": rem dL4opts=output=LPT1,translate=c:\dl4\printers\hplj,lock=true A printer script using direct output should consist of a single options line; all subsequent lines will be ignored. A direct output script always uses the Unicode character set and ignores any "charset" options. o The MSC$() function has been extended to provide a MSC$(7) value which is the hot-key character, if any, that invoked execution of the current SWAP level. The value of MSC$(7) is an empty string ("") if the current program isn't in a hot-key initiated SWAP level. This new value can be used to perform different functions in a hot-key SWAP program based on which hot-key character was entered. o The 'IOBI' and 'IOEI' binary input mnemonics can now be used in dL4 windows. The meaning of binary input is dependent on the operating system environment and so the use of 'IOBI' should be avoided in portable programs ('IOBC' and activate-on-control-character mode may be a suitable replacement). In all environments, binary input disables special treatment of editing keys such as backspace. In the Windows environment, binary input disables special character handling by dL4 and treats all characters as data. Special characters like Control-Alt-Del, which are handled by Windows itself, are not effected. Echo should be disabled when using binary input to avoid echoing illegal characters. o The BASIC/Debug command SIZE has been extended to accept a "-l" option which causes the sizes and names of all linked libraries to be displayed. o Two new commands, "WB" and "WT", have been added to the SCOPE debugger to move the debugger window to the bottom ("WB") or the top ("WT") of the screen. Note that a debugger window is only used if dL4 windows are open. o Three new commands, "WF", "WH", and "WS", have been added to the SCOPE debugger to resize the height of the debugger window. The commands set the debugger window to the full ("WF") height, one half ("WH") height, or a quarter ("WS") height of the full screen, The debugger WINDOW command has been extended to accept a single numeric parameter to set the number of lines in the window (the command "WINDOW 6" or "W6" would select a height of 6 lines). o The SCOPE DISPLAY command and the ProgramDump intrinsic CALL have been modified to print repeated array values in a single line using an array slice notation. For example, if the array V had 10 elements and all of the elements were zero except for V[4]=7 and V[8]=9, then the command "DISPLAY V" would produce the following output: * V[0;3],%13 = 0 V[4],%13 = 7 * V[5;7],%13 = 0 V[8],%13 = 9 V[9],%13 = 0 Note that all lines with repeated data are prefixed with an asterisk. o The size and position of the debugger window is retained between debugging sessions until SCOPE exits. o The EXIT command has been added to the debugger so that the user can exit directly to SCOPE command mode. o The SCOPE DRIVERS command now accepts a search string to select which drivers are displayed. Example: "drivers isam". o The maximum port number has been increased from 255 to 4095. o A new optional section, "[Header]", is supported by the conversion profile files used by the CONVERT command and the LOADSAVE "-c" option. This section can be used as shown below to add standard OPTION statements to programs as they are converted: [Header] Line=OPTION STRING SUBSCRIPTS IRIS Line=OPTION BASE YEAR 1988 Lines from the header section are added using the first unused line number and so they may be inserted after the first converted line. o A new standard intrinsic CALL, DupChannel, has been added to dL4. This call allows dL4 programs to duplicate existing open channels onto closed user channel numbers. These duplicate channels can be used to perform I/O in the same way as the original channels. The primary use of DupChannel is to duplicate the standard input and output channels that are used by INPUT and PRINT when a channel isn't specified. By duplicating the standard input or output channel onto a user channel number, a program can apply channel oriented statements such as SET to a standard channel. Because DupChannel duplicates the base standard input and output channels, it can also be used to avoid window tracking when Dynamic Windows are active. Closing the duplicate or original channel has no effect other than freeing the channel number unless all copies of the original channel are closed. BASIC syntax: Call DupChannel(newchannel, oldchannel) Where: newchannel - a numeric variable or expression specifying the closed user channel (0 - 99) onto which the standard channel will be duplicated. An error will be generated if newchannel specifies a channel that is already open. oldchannel - a numeric variable or expression with a value of an open user channel (0 - 99), standard input channel (-1) or standard output channel (-2) to duplicate. The standard input and output channels are the original base channels and not the window channels used by Dynamic Windows. An error will be generated if oldchannel specifies a channel that is not open. o A new standard intrinsic function, CRC32, has been added to dL4. CRC32() returns a 32-bit CRC checksum code of the first argument which must be either a binary or string variable. An optional second numeric argument can be used to pass the CRC value from a previous call and calculate a combined CRC of several variables. CRCs are calculated against the DIMed size of strings so that zero characters can be included in the CRC. Subscripts can be used to limit the number of characters included in the CRC. So that string values will produce the same CRC values on all platforms, each UNICODE character of a string is forced into a most-significant-byte -first ordering for CRC calculation. An error will be generated if an illegal number of parameters, parameter type, or parameter value is used. BASIC syntax: x = CRC32(var) x = CRC32(var, oldcrc) o A new standard intrinsic function, FindChannel, has been added. FindChannel() returns the first closed channel number in a range. If no range is specified, the first channel between 99 and 0 (note descending order) is returned. An error will be generated if an illegal number of parameters, parameter type, or parameter value is used. BASIC syntax: x = FindChannel() x = FindChannel(startchan,endchan) o The Env and SortInString (CALL 65) intrinsic CALLs are now standard intrinsic CALLs. In previous releases, the sources for these CALLs were included in the development kit, but they were not linked into SCOPE or RUN. The effect of using Env to change the value of dL4 runtime parameters is undefined for the running process: the change may or may not effect the value used by the running process. Applications must not depend on the current treatment of environment variables by dL4 because that behavior may change in future releases. Applications should only change environment variables defined by the application itself. o A new mode has been added to the PORT statement. PORT mode 4 returns the name of the current program of a specified port. For example, the statement: PORT P,4,S,F$ will return in F$ the name of the program running on port P. As with PORT mode 3, a status is returned in S indicating success (zero) or failure (one, port not attached). o The SCOPE command line now uses LIBSTRING to find BASIC program files. o The SPAWN statement now uses LIBSTRING to find BASIC program files unless an OPTION statement with "CHAIN ALTERNATE DIRECTORIES OFF" is used. An error 206 ("subprogram file not found") will be returned if the specified program cannot be located. o The EXAMINE, BREAK, and NOBREAK debugger commands now recognize the filename of the main program in addition to its path (as displayed by the STATUS command). o The FoxPro Full-ISAM driver now supports the memo (.fpt) portion of a FoxPro file when deleting, MODIFYing, or DUPLICATEing FoxPro Full-ISAM files. o The FoxPro Full-ISAM driver now tries both the normalized and literal names when mapping fields and indices. This allows the MAP statement to support a wider range of field or index names. o Input timeout ("INPUT TIM") is now supported on phantom ports. o Input characters following a "hot key" (SWAP input action) character are now always left in the input queue and can be read by the SWAPped to program. o When native locale date format is enabled by the statement "OPTION DATE FORMAT NATIVE", string to date conversion now uses the short date style of the regional locale information to select the preferred ordering of numeric dates. For example, if the short date format is "yy/MM/dd", the statement 'D# = "01/02/03"' would store the date "February 3, 2001" in D#. Please note that string to date conversion tries several formats, both numeric and non-numeric, to parse the date and time. o Input handling by the RAW driver for serial communication devices such as COM1 has been improved to support input timeout. Note that serial device characteristics such as speed and flow control must be setup externally using the Windows 95/NT MODE command. o The maximum parameter value for the PRINT TAB function and the COMMA SPACING option has been increased from 255 to 65535. o The following new TIM functions have been added to return 4-digit years: TIM(14) Current date in the from MMDDYYYY, MM = 1-12, DD = 1-31 TIM(15) Current date in the form YYYYDDD, DDD = 1 to 366 TIM(16) Current year in the form YYYY These functions correspond to the two digit year functions TIM(4), TIM(5), and TIM(8). o A new channel function, CHF#(), has been added to return the creation, last access, or last modification date/time of a file. The creation date/time is returned by CHF#(100+c) where 'c' is a channel number. Similarly, the last access and modification date/times are returned by CHF$(200+c) and CHF#(300+c). Note that opening a file will change the last access date/time unless the "Raw" file driver is used. o Linker speed has been improved for programs that use an extremely large number of libraries (> 50). o Behavior change: The first record number of a Portable Indexed Contiguous file can now be set to zero using a mode 1, index 0 SEARCH statement with a status value of 6. The statement must be executed prior to freezing the index definitions. In previous versions of dL4, an attempt to set a first record number of zero was ignored. o Behavior change: the linker has been modified to allow user defined procedures to overload intrinsic procedures. For example, a user program that defines a function called FindChannel will use that function rather than the new intrinsic FindChannel function. o Behavior change: Portable Indexed Contiguous and UniBasic Indexed Contiguous files now flush the data record buffer whenever a key is inserted or deleted. This avoids a situation in which, when a new record was inserted, a separate program reading the file and ignoring record locks would receive a "Record not found" error when accessing the new record. Note that a "Record not found" error can still occur if the new record is not written until after the key is inserted. Writing the new record after inserting the key is an application error which must be corrected in the application program (otherwise there is an unavoidable period between the SEARCH and the WRITE in which the key exists, but the data record does not). o Behavior change: the file autoselection mechanism now recognizes UniBasic formatted, contiguous, and indexed-contiguous files. The drivers for these files are not included in dL4 for Windows because these files are not portable and, hence, no existing Unix UniBasic file could be accessed. New files should be created in the Portable Formatted, Contiguous, and Indexed-Contiguous formats. A "No such driver" error will be reported by any attempt to open a UniBasic file. o File locking in Indexed Contiguous files has been modified to increase compatibility with NFS client software. o The runtime parameter, "WarnOnClose", has been extended to support multiline messages by treating "\n" as a line separator. A backslash must now be entered as "\\". o The appearance of full screen scrolling has been improved for many display cards. o Behavior change: if a network connection on standard input or standard output is lost by scopec.exe or runc.exe, it will be assumed that a telnet-style connection has been terminated and that dL4 should exit. o Behavior change: an attempt to delete an open file will wait for up to one minute for the file to close rather than immediately reporting a "File is busy" error. o Bug fixed: an "Internal error in driver" error was reported when searching a FoxPro Full-ISAM file that had been opened in read/write mode if the file permissions allowed only read-only access. o Bug fixed: a FoxPro Full-ISAM key size of more than 127 characters caused the index to become corrupted. Please note that while keys of up to 240 characters are supported, key sizes should be limited to 150 characters or less for efficient index operation. o Bug fixed: selecting a cut-and-paste area on the screen caused the display to become corrupted if the screen was scrolled. o Bug fixed: To increase compatibility with BITS programs, the Portable Contiguous and Portable Indexed Contiguous drivers have been changed to follow BITS alignment rules when OPTION FILE ACCESS RAW is used. Using FILE ACCESS RAW, the current file position will no longer be rounded up to an even byte boundary when reading or writing numeric variables or when executing MAT READ or MAT WRITE statements. The new behavior matches that of the UniBasic Contiguous and Indexed Contiguous drivers. If desired, the Portable Contiguous driver (pcontig.c) in the dL4 development kit can be modified to restore pre-3.1 behavior. o Bug fixed: an address violation or memory corruption could occur if an 'EG' (End Graphics) mnemonic was the first character in an output string when using either the UniBasic or IRIS character set. This would most commonly occur when printing to an output pipe using the default character set. o Bug fixed: SCOPE or RUN would "hang" (enter an infinite loop) when attempting to run or link a program that contained a duplicate procedure definition in a library. o Bug fixed: the cursor is moved to the end of input line when an enter key is pressed during input editing. o Bug fixed: SPC(23) returned -1 instead of "n" after the statement "LIB n" had been executed. o Bug fixed: the FoxPro Full-ISAM driver did not correctly concatenate field names for members of sub-structures. When a member of a record structure was itself a structure, all members of that sub-structure were treated as having the same, incorrect name. o Bug fixed: trailing exclamation marks were not recognized by the DUPLICATE or MODIFY statements for Portable Indexed Contiguous files. o Bug fixed: the SYSTEM statement generated a runtime syntax error if a status variable was used with an external system command ('SYSTEM "cmd",S'). o Bug fixed: converting a string to a date caused an error 15 if the date was numeric and a two digit year of zero was used. For example, the statement 'D# = "14-10-00"' would fail and report an error. o Bug fixed: expressions containing 24 string concatenation operations could cause memory violations or corrupt the current program. o Bug fixed: reading the command line ("INPUT (0,X)C$") after using the debugger could cause memory violations. o Bug fixed: input was echoed incorrectly in insert mode. o Bug fixed: including a space in BREAK/NOBREAK search string (such as in "BREAK /CALL PGM/") resulted in a format error. o Bug fixed: if a newly built and structured Portable Indexed Contiguous file was CLEARed (rather than CLOSEd), the index portion of the file wasn't deleted. o Bug fixed: pfilter sometimes delayed output until subsequent output or a CLOSE occurred. o Bug fixed: rounding of ICE format numbers has been improved so that values such as "4.49999999" will be loaded correctly. o Bug fixed: a "Record not written" error was generated whenever a program was executed with LIBSTRING defined in HKEY_LOCAL_MACHINE of the registry. o Bug fixed: an "Internal driver error" occurred in the Microsoft SQL Server Full-ISAM driver when searching a non-unique index that shared key fields with the primary unique index. o Beta version bug fixed: when using LUMAP with numeric directories (Logical Unit numbers), all leading zeroes were deleted except for the last zero. Thus, "005/file" and "05/file" were treated as having a directory name of "05" rather than "5". o Bug fixed: if LUMAP was defined and the current directory was one of the directories in LUMAP, then a CALL, CHAIN, or SWAP to a program in the current directory would fail if the program filename did not specify a directory ('CALL "PGM"' rather than 'CALL "1/PGM"'). In addition, a SCOPE "CD lu/" resulted in an "illegal filename" error. o Beta version bug fixed: an attempt to load a program or library saved by an older version (2.3.1 or earlier) of dL4 would result instead in loading a different, but previously loaded, program. o Beta version bug fixed: if two identical programs were loaded consecutively, they were treated as having the same path. Networking ========== o File access under dL4 has been tested with Windows NT file servers using both TCP/IP and NetBEUI protocols. dL4 file access does not use any special network system calls and should be compatible with any network file service that supports file access through normal file access system calls. File access to Novell servers or using third-party NFS client software has not been tested. o Windows 95/98/ME systems with out-of-date system files or incorrect configuration can improperly cache file data from network file servers. This caching problem can corrupt data files and their indexes. The dL4 checksys.exe utility in the dL4 installation directory should be run on all Windows 95/98/ME systems that share data files over a network. The utility will detect any needed local system updates and will offer to set necessary system registry options. The utility should also be copied to and run on all Windows NT/2000 file servers accessed by Windows client systems. This caching problem has been detected only when using Windows 95/98/ME client systems. The problem has not been observed when using Windows NT/2000 file servers with Windows NT/2000 client systems (service pack 3 or later applied to all NT systems). Notes ===== o dL4 for Windows cannot be used with Windows 3.1. dL4 will run under the Window 95, Windows 98, Windows ME, Windows NT, or Windows 2000 operating systems. o Before using dL4, Passport for Windows must be installed and a valid license and SSN must be registered using the ssnmaint utility. The ssnmaint utility is part of Passport and can found in the Passport program group. Please contact the sales department at Dynamic Concepts (sales@dynamic.com) for information on obtaining a license and SSN. o The record locking protocols used by the Portable Formatted and Portable Indexed Contiguous drivers are incompatible with pre-3.1 versions of dL4. The protocol was changed to support reading through locked records on both Unix and Windows. If a Portable Formatted, Contiguous, or Indexed Contiguous file is accessed simultaneously by this release and a pre-3.1 release, the file data may be corrupted. o The "OPTION FILE ACCESS RAW" statement is used to select BITS compatible file treatment and data alignment rules. In pre-3.1 versions of dL4, the Portable Contiguous, Portable Indexed Contiguous, and Full-ISAM Bridge drivers did not properly follow BITS alignment rules when OPTION FILE ACCESS RAW was used. In dL4 3.1, these errors have been corrected. If your programs use the FILE ACCESS RAW option, your programs and file layouts should be examined for compatibility with these changes. Using FILE ACCESS RAW, the current file position will no longer be rounded up to an even byte boundary when reading or writing numeric variables or when executing MAT READ or MAT WRITE statements. If desired, the driver sources in the dL4 development kit can be modified to restore pre-3.1 behavior. o Copy and Paste functions are available via the "Edit" menu which is part of the main window menu bar or part of the System menu ("Alt-Space"). o Font characteristics, window size, keyboard translation, and input action assignments can be modified using the "Preferences" menu. The "Preferences" menu is part of the main window menu bar or part of the System menu ("Alt-Space"). The "Preferences" menu provides access to the "Font", "Window" and "Keyboard" dialogs. Features that are controlled by the "Window" or "Font" dialogs will not change until the next entry into scopew or runw. o The number of lines and columns in the main window is controlled by registry settings and defaults to 25 lines of 80 columns. The values cannot be changed for a running instance of dL4, but the registry values can be modified by the "Window" dialog for use by the next entry into dL4. In that dialog, the canvas values control the actual number of rows and columns while the window values control the number of rows and columns that are displayed. o The default foreground and background colors are controlled by registry settings and default to those of the system color scheme. The default values cannot be changed for a running instance of dL4, but the registry values can be modified for future invocations by using the "Window" dialog. o Keyboard translations and input action assignments can be modified using the "Keyboard" dialog of the "Preferences" menu. Changes are applied immediately and are saved in the registry for all future invocations of dL4. The "Keyboard" dialog contains two sections: "Special Key to Unicode" and "Unicode to Input Action". The "Special Key to Unicode" section is used to examine, add, or modify translations of key combinations to Unicode characters. For example, to define "Shift-F1" to be the character 'F13', enter "F14D", the Unicode character value of 'F13', in the edit box under the heading "Unicode", select the edit box under the heading "Key Combination", press the SHIFT and F1 keys, and then click "Set" and "Ok". Warning: it is possible intercept normal Windows keys such as Alt-F4 (Close Window/Application) and thus interfere with normal Windows keyboard usage. In the list box, a "Key Combination" value of "VK=xxx" indicates a key combination which isn't supported by the keyboard. The "Unicode to Input Action" section is used to examine, add, or modify assignments of input actions to Unicode characters. For example, the character 'F9' is assigned by default to be the SWAP character. To use 'F9' as a data character, select the character range U+F149 to U+F149 in the list box, select "Data" from the "Action" drop down list, and the click "Set" and "Ok". o The default input action assignments are: control-B Send signal to program control-C Interrupt program control-D Abort program control-E Toggle echo and enter control-E into input Backspace Backspace and delete character Enter Enter control-X Delete all input Escape Escape program Left-arrow Move cursor left Right-arrow Move cursor right Insert Toggle input insert/replace mode Delete Delete input character Home Move cursor to start of input End Move cursor to end of input Control-Left-arrow Move cursor to previous word Control-Right-arrow Move cursor to next word Control-End Delete characters to end of input F9 Swap (if enabled via SWAPF()) BEGIN Enter "BEGIN" mode o The port number used by dL4 can be controlled by setting the PORT environment variable or the registry REG_DWORD value PORT under one of the following keys: HKEY_CURRENT_USER\Software\DynamicConcepts\dL4\Environment HKEY_LOCAL_MACHINE\Software\DynamicConcepts\dL4\Environment o The values for SPC(5), SPC(7), and MSC(7) can be controlled by creating SPC5, SPC7, and/or MSC7 environment variables or registry values. Registry values must be of the type REG_DWORD and must be created under one of these keys: HKEY_CURRENT_USER\Software\DynamicConcepts\dL4\Environment HKEY_LOCAL_MACHINE\Software\DynamicConcepts\dL4\Environment o The LIBSTRING value can be set by creating a LIBSTRING environment variable or registry value. A Registry value must be created under one of the following keys: HKEY_CURRENT_USER\Software\DynamicConcepts\dL4\Environment HKEY_LOCAL_MACHINE\Software\DynamicConcepts\dL4\Environment o The registry can be edited using the standard REGEDIT or REGEDT32 (for Windows NT/2000) utilities. o Screen, keyboard, and other configuration information can be copied between systems by exporting the registry contents of Software\DynamicConcepts\dL4 to a file and then importing that file on the target system. Under Windows 95/98 or Windows NT/2000, the standard REGEDIT utility can be used to perform this function. Platforms ========= Operating system information for dL4 5.3.4 production: ID Platform OS --------------------------------------------------------------------------- 1B Win32 Intel Windows 95/98/ME or Windows NT 4.0/2000/XP/2003