Monday January 6, 2003 dL4 for Windows Runtime 5.1.5 Maintenance Release All Rights Reserved. Copyright (c) 1997 - 2003 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.1.3 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. 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.1.5.exe (or whatever filename you have copied it to) and follow the displayed instructions. If the most current version of Passport for Windows hasn't been installed on the system, 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 NT 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 A new runtime parameter, DL4LUST, to provide a search list based file lookup mechanism similar to the UniBasic LUST environment variable. o Improved CONVERT command and "LOADSAVE -c" utility features to ease conversion of UniBasic, IRIS, and BITS programs. o Approximately 40 new intrinsic CALLs to duplicate UniBasic user CALLs. o Support for intrinsic CALLs that pack or unpack numeric variables into string variables. o UniBasic compatibility utility programs such as LIBR and KEYMAINT. 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. New in This Release ================================================================= 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 'WCMEM