- Euphoria Release Notes Version 3.1 June 2007: This release adds some new features, fixes some bugs, and improves the documentation. New Features New built-in routines, find_from() and match_from() have been added. These work like find() and match() but they let you start searching from any element in the sequence, not necessarily at element 1. This makes some algorithms simpler and much faster. Implemented by Matthew Lewis. When searching for an include file specified with a relative (i.e. not absolute) file path, Euphoria will check first for a file relative to the location of the current source file. If not found, then the usual rules will apply, i.e. it will check relative to the main program file, then check the EUINC directories (if any), and finally euphoria\include. Suggested by C.K. Lester and, in various forms, by several other people. Implemented by C.K. Lester. Checked in by Matt Lewis. ex int.ex (in euphoria\source) will now work, since the interpreter now supports machine_proc(65,...) which passes IL to the fast C-coded back-end. You can also run int.ex with exw or exu. This lets you easily modify the front end and get a modified Euphoria interpreter, for all platforms, that runs programs at full speed (much faster than the Euphoria-coded execute.e). You might also bind int.ex to get a single executable file for whatever platform you like. If the user does not supply a filename with an extension, Euphoria will attempt to open the file first with the standard extension for its respective platform, but if it does not find it, it will also look for files with the standard extensions for the other platforms. Implemented by Matthew Lewis. Translator: The limit on the number of additional .c files that can be created per Euphoria file has been raised from 36 to well over 1000. New Documentation The "storage cache" compression technique that's used for bound executables and .il files, was documented in comments added to compress.e. It reduces the size of the IL by 30% or more, while allowing fast decompression. A documentation file, tasks.doc, was added to euphoria\demo\langwar. It describes the multiple tasks used in Language War. Bug Fixes bug fixed: Translator: Translated code for routine_id() erroneously returned -1 when a global symbol was looked up which matched a symbol in the same file as the call to routine_id(), as well as a global symbol in another earlier file. It was treated incorrectly as a multiply-defined symbol that was lacking a namespace qualifier. Thanks to Daniel Kluss. bug fixed: Translator: In rare situations, a naming conflict could occur when more than one .c file is created for a Euphoria file. Thanks to DB James. bug fixed: Translator: get_key(), when translated/compiled with Borland or LCC, required an extra keystroke after a carriage return. Implemented by Jacques Deschenes. bug fixed: Source Code Portability: euphoria.h: CLK_TCK is now defined as CLOCKS_PER_SEC if not defined previously in the source. Implemented by Matt Lewis. bug fixed: Installer: Double-quotes were added around several filenames used in the INNO installer script (though this did not seem to affect many people). Version 3.0.2 February 9, 2007: This release fixes some important bugs in 3.0.1, and improves the source code documentation. Bug Fixes bug fixed: Translator: Programs translated to C and compiled for Windows would crash if they used the new multitasking feature. (This worked in 3.0.0 but was broken accidentally in 3.0.1 because some stack offsets changed.) bug fixed: Interpreter: In fairly rare situations, the interpreter for Windows might crash. This was due to a bug in load_private_block() where it was freeing a block of memory and then returning a pointer into that block. In rare cases, a page of virtual memory might be removed from the heap by the Windows O/S before the block could be read. Thanks to Andy Serpa, Pete Lomax, Matt Lewis, Derek Parnell, and others for helping to pin-point the location of the bug. bug fixed: Source Code: "\euphoria" was changed to to %EUDIR% in 4 .bat files in the source directory. Thanks to Jaime Marcos. Improved Documentation A new document (translator.doc) was added to euphoria\source. It describes the internals of the Translator, with emphasis on the many optimizations that the Translator performs. The user documentation was also improved in a few places. C Source Code Changes Matthew Lewis added a Linux/FreeBSD make file, and made source code changes to better support Open Watcom and a newer version of GCC. Version 3.0.1 November 3, 2006: This release cleans up a number of bugs and documentation errors in 3.0.0. Improved Documentation A separate new document on multitasking was added. Obsolete pre-open-source concepts in the 3.0.0 documentation were deleted or corrected. Bug Fixes Euphoria-coded .dll / .so files were not working at all, due to a multitasking-related glitch. Thanks to Andrea Cini. Note: execution of multitasking built-in routines is currently not supported inside a Euphoria-coded .dll / .so. You'll get a compile-time error message from the Translator if you use the -dll option and your library source code contains multitasking operations. Other than that, use of Euphoria-coded .dll / .so files by main programs that do multitasking is fine. A text console bug was fixed. It involved output to the screen involving tabs and/or wrap-around (at 80 columns). Thanks to Pete Lomax, Juergen Luethje, Matt Lewis. bind.bat, bindw.bat and shroud.bat were changed to use %EUDIR% rather than \EUPHORIA. Thanks to Ray Smith. syncolor.e now includes keywords.e (relative to euphoria\bin) rather than \euphoria\bin\keywords.e. Thanks to Rick Bettis. C Source Code Changes All of the #ifdef ENCURSES code was stripped out. We don't plan to use ncurses again, and this change makes parts of the source code much more readable. A thread5() machine language macro was added to be_execute.c This helps the interpreter to compile correctly with Open Watcom, avoiding a C optimizer bug. Thanks to Matt Lewis. Version 3.0.0 October 17, 2006: With this release, Euphoria has become a totally free and totally open source product! RDS will continue to develop Euphoria with the aid of many additional clever programmers. The free download package now includes the Interpreter (with either a C or a Euphoria-coded back-end), Binder/shrouder, fully-enabled Translator, and the full source code for all of these. Thousands of people can now examine the full source code for bugs, performance improvements, and potential new features. Rather than having alpha, beta and official releases, we will now simply have numbers, 3.0.0, 3.0.1 ... We expect to have releases more frequently, though each release will likely be a smaller change compared to the previous release. Enhanced Features Cooperative Multitasking. Rather than having just a single thread of execution, you can now create multiple tasks that run independently of one another. Each task has its own currently-executing statement, subroutine call-stack, and private variables for all routines on its call-stack. Tasks share global and local variables but not private variables. At any point during its execution, a task can call task_yield() to transfer control to the Euphoria scheduler which will choose the next task to run. When control returns to the original task, execution will continue from the statement after task_yield(). New Run-time routines: task_create(), task_schedule(), task_yield(), task_suspend(), task_self(), task_list(), task_status(), task_clock_start(), task_clock_stop() Use of the ncurses library has been eliminated for Linux and FreeBSD. ncurses routines sometimes caused problems on some Linux/FreeBSD systems. The Euphoria backend now uses ANSI escape chars to get 2-d positioning and colors for a plain text-mode console. Also, the use of libgpm (console mouse support) has been dropped on Linux. (It was never supported by Euphoria on FreeBSD). Include files with the same file name but a different path as an earlier include, will no longer be ignored. To be ignored, an include must refer to the exact same file as an earlier include. (a new name space can still be defined, even though the include file is not actually included again.) On Linux/FreeBSD a case-sensitive file-name comparison is now used. There is possible (but unlikely) breakage of old code: You might start including files that you did not intend to include, if you have a previously-ignored include statement for them in your code. Solution: Delete the undesired include statement. If an include is incorrect (file is not on the include search path), this error may have been hidden under the old system, if a correct include with the same file name (but different path) came earlier. Solution: Specify the correct path to the include file. There is no longer a limit on the number of warnings that can be displayed. Instead, you will be given the chance to scroll through all the warnings, 20 at a time. As before, if a ex.err file is created, then all warnings will also be stored at the end of the ex.err file. Thanks to Judith Evans. Translator: You can set the run-time stack size for your program using the -stack nnnn option. The default stack size has been increased for most of the supported C compilers, especially when your program contains a call to task_create(). If a run-time error occurs and ex.err can't be opened, a check will be made to see if it's because you have too many open files. An appropriate message will then be issued. Several people ran into this situation. execute.e: Additional run-time error checks were added to several run-time routines to allow the pure-Euphoria source interpreter to catch more errors itself, rather than letting the C-coded run-time routines used by the "real" interpreter or translator catch them. pretty_print(), option 3, now includes \t \r and \n as valid "ASCII range" characters. This increases the likelihood of strings being displayed. Thanks to Juergen Luethje. The ASCII 127 char will not be graphically displayed on Linux in trace or in default pretty_print(). It displays as a backspace when ANSI codes are used. Binder options are checked more strictly. e.g. -xxxoutxxx was dangerous The binder now looks for match(x,y) = 1, rather than match(x,y) != 0. The binder also avoids overwriting a source file when -out is used. Thanks to Mike Sabal, Greg Haberek We've switched to using transparent Euphoria icons. Thanks to Vincent Howell. Pure Euphoria interpreter (eu.ex): The "not initialized" message has been improved to: "xyz has not been initialized" Many small improvements were made to the documentation. e.g. the use of a single atom value by multiple printf() formats was documented for the first time. Thanks to Pete Lomax. Bug Fixes bug fixed: Translator: a Euphoria file named "main.e" or "init.e" could possibly lead to a file naming conflict. The chance of a conflict is now greatly reduced, and if a conflict occurs, a meaningful error message will be issued. Thanks to Vincent Howell. bug fixed: Translator: using "interrupt" as a Euphoria variable name caused a naming conflict when compiling with Watcom. Thanks to Louis Bryant. bug fixed: Translator: A backslash at the end of a Euphoria comment could be considered a line continuation character by the C compiler. This could result in incorrect code being generated. Thanks to Mark Honnor. bug fixed: Translator: A call to a Euphoria-coded routine in a .dll, i.e. via c_func(), could cause a bug if the return type was sequence or object. Thanks to Thomas Jansen. bug fixed: If you pass file number -1 to printf() you will now get a run-time error report. In all previous releases, -1 would simply cause printf() to produce no output. Thanks to Daniel Kluss. bug fixed: scanner.e: Source lines longer than 10000 characters caused a problem. Also we were not checking for allocate() returning 0 in pack_source() (i.e. out of memory condition). Thanks to Antonio Alessi. bug fixed: execute.e: (pure Euphoria interpreter) In some cases slice indexes were not being bounds checked before being used. eu.ex would crash rather than report the error in the user's program. bug fixed: Assignments of the form: x[a][b..c] += expr were likely to trigger an erroneous subscript error in execute.e, the pure Euphoria interpreter. Thanks to Vincent Howell. bug fixed: execute.e did not handle fractional subscripts correctly in some situations. Thanks to C Bouzy and Vincent Howell. Version 2.5 Official Release March 8, 2005: Enhanced Features The Source Code Product now includes the C code for interactive trace/debug and profiling. This was not provided in any previous release. Translator: A new -fastfp option has been added for WATCOM/DOS (registered version only). This option can double the speed of a floating-point intensive, translated/compiled, program. The resulting .exe file requires a Pentium class CPU, or a 386/486 with floating-point hardware. eu.ex: execute.e now uses call-back machine code supplied by Matthew Lewis. As a result, there is no longer a limit on the number of call-backs a program can use. Translator: There is now a -keep option that prevents the deletion of any C files or object files created during translation. Thanks to Matthew Lewis. Translator: In order to handle huge programs without exceeding the limits of the C compiler, the translator will split init_.c into several pieces. Thanks to Matthew Lewis. Translator: Better checking is provided for incorrect command-line options. Translator: The translator avoids creating any files until it confirms that a valid source file has been provided on the command line, or via the interactive prompt. ed.ex: ed will only call free_console() at the end of execution on Linux or FreeBSD. It was causing a slight screen flicker on DOS/Windows, and was not necessary. Bug Fixes bug fixed: The error traceback from a bound or shrouded program had garbage showing for the file names and line numbers. This bug was introduced in the beta release. bug fixed: Bound or shrouded programs were not starting off with a fresh random seed value. Normal interpreted or translated programs were OK. Thanks to Michael Bolin. bug fixed: The error traceback could be wrong if you (illegally) tried to pass a sequence as the routine id for call_proc/func. Thanks to Mario Steele. bug fixed: When displaying a large variable value during interactive trace, the first few lines might be printed in white, while the rest was printed in bright white. Thanks to Al Getz. bug fixed: routine_id() of the form: routine_id("namespace:name") was not working correctly in the interpreter or in the PD source interpreter. The Translator was ok. This worked fine in 2.4 and earlier. Thanks to Verne Tice. bug fixed: command_line() now shows the extra file name when the user types the file name interactively at the ex/exw/exu prompt. This is now compatible with 2.4 and earlier. Thanks to Bob Elia. bug fixed: Warnings were not getting reported when a program ended with a call to abort(), or it ended with a fatal run-time error. Thanks to Juergen Luethje. bug fixed: The platform() function is now evaluated in backend/backendw/backendu for .il files (rather than in the front-end of the shrouder). This allows a .il file to be portable to multiple platforms. In other situations, the interpreter and translator will continue to evaluate platform() in the front-end for maximum efficiency. Thanks to Ken Rhodes Documentation Many small corrections and improvements were made to the documentation. Some important ones were provided by Juergen Luethje and Wolfgang Fritz. A paragraph was added to the Reference Manual explaining what happens when you try to modify a variable by function side-effects at the same time that you try to modify it via subscripted assignment. The 2.5 alpha release notes were updated to point out an incompatibility with 2.4. Version 2.5 Beta Release January 14, 2005: Improved Performance The initial parse time (start-up time) of interpreted programs has been reduced, typically by 25% on newer machines, and 40% on older machines, when compared to 2.5 alpha. In the case of old machines running very large programs, the start-up time can be 65% to 90% less, especially when with trace or with profile are in effect. Most of the optimizations were made to the Euphoria front-end source that's shared with the Public Domain source interpreter, so eu.ex also has reduced parse times. A major speed improvement was made in opASSIGN_SUBS() in the PD source interpreter. This operation handles assignments to subscripted sequences, and is executed a lot. Thanks to Greg Haberek for showing the slowness. Translator: In many more cases, the Translator now knows the type of all elements of a sequence. This is especially useful when the elements are known to be integers. Smaller and faster code is generated for accessing the elements, and freeing the sequence. In most cases, the Interpreter and the Translator now evaluate sequence-formation {a, b, c, ...} expressions once at compile-time, instead of each time at run-time, when the elements are all constant integers (either hard-coded numbers or symbols declared as constant). This saves time, and also reduces code size for translated programs. database.e: db_select_table() returns quickly if you happen to select the table that's already selected. This can save a lot of time in situations where it's not convenient for the application to keep track of which table is currently selected. Thanks to Derek Parnell. Enhanced Features The shrouder will now supply a default #! (shebang) line at the top of the .il file, if none was specified. Thanks to Kenneth Rhodes. On Linux, the shrouder will give the .il file execute permission. Thanks to Kenneth Rhodes. On Linux/FreeBSD the Binder no longer creates bound executable programs with a ".exe" extension. Now, no extension is used. This is compatible with the Translator, and more in keeping with the standard on Linux/FreeBSD systems. Thanks to Jerry Story. database.e: Extra checks were added to some routines to give a more meaningful error message when no table has been selected yet. Thanks to Derek Parnell. Several small improvements in the Source Code product and its documentation make it easier to compile using Open Watcom and other compilers. Thanks to Jean-Marc Duro. The main source file is now closed right after the front-end finishes. This allows a program to edit or otherwise modify its own source. The initial random seed value is now chosen more randomly on Windows. Thanks to Akusaya. DOS/Windows Installation Program The install program will set up ed.bat to run ed.ex with ex.exe on ME/98/95, and exwc.exe on NT/2000/XP. The install program will not change any existing file associations for Euphoria file types. (If you install Euphoria in a new directory, you might have to change these yourself.) Thanks to Juergen Luethje and others. The Start Menu links created by the install program were wrong: exw was incorrectly pointing to ecw.exe, and ex was incorrectly pointing to ec.exe. Thanks to Akusaya. It's ok now to have a blank in the path of the installation directory: e.g. "C:\Program Files". Thanks to Rich. Bug Fixes bug fixed: When building a Linux/FreeBSD .so file from Euphoria code that contained call_proc() or call_func(), an undefined "__stdcall" symbol appeared in the C file by mistake. Thanks to Matt Lewis. bug fixed: The opening message displayed by the Binder on Linux/FreeBSD and on Windows was wrong. Thanks to Kenneth Rhodes and Igor Kachan. bug fixed: routine_id() was checking for symbols coming later in the code. This happened in the Interpreter only, and only at the top-level, not inside a routine. This fix requires .il files shrouded with 2.5 alpha to be reshrouded with 2.5 beta or later. Bound files are not a problem. bug fixed: A complex expression on the left hand side of an assignment, involving nested use of $, could crash. Thanks to Andy Serpa. bug fixed - Translator: A call to routine_id() would sometimes search past the end of a list and start reading garbage in memory. In most instances this did not cause a problem, but in some cases it could cause a crash. Thanks to Kenneth Rhodes. bug fixed - Translator: In a rare situation, the 2.5 alpha Translator could crash while attempting to optimize some code. bug fixed - Translator: In a rare situation, at the end of execution of a particular routine, the translated code would fail to free some space used for a temporary value. Thanks to Wolfgang Fritz. bug fixed: After a compile error in exw you would have to hit Enter, then a message would say: "Press Enter...". (Things worked properly for run-time errors). Thanks to Tone Skoda. bug fixed: An incompatibility existed between the way that abort(1) was handled in the Translator vs the Interpreter. Thanks to Juergen Luethje. bug fixed: save_text_image(), when run by exw or exwc, occasionally returned some garbage in the upper bits of the character attributes. Thanks to Brian Broker. bug fixed: The CAPS lock key generated a key code when using ed with exwc. The key had the desired effect, but it caused ed to display a message at the top of the screen. ed will no longer display the message. Thanks Alex Caracatsanis. bug fixed: routine_id("") would crash the Binder and Translator. Thanks to Antonio Alessi. bug fixed: A line longer than 200 chars crashed the trace display. Thanks to Thomas Betterly. bug fixed: Symbols declared as constant were not defined in the trace window. Thanks to Matthew Lewis. bug fixed: printf() format strings were wrong in two error messages in execute.e Thanks to Derek Parnell. bug fixed: The caret (arrow) symbol, displayed in compile-time error messages, was shifted one position to the right, when compared with version 2.4. This has been corrected. Thanks to Juergen Luethje. bug fixed: For compatibility with the official Interpreter, routine id's now start at 0 instead of 1 in the PD source interpreter. Documentation A paragraph was added to "Scope" discussing how you can override predefined routines with your own variables and routines. Thanks to Mike. A warning was added to open() about the use of CON and CON.*, and other file names that are reserved by DOS. Thanks to Igor Kachan. The fact that programs are now fully parsed before being executed was explained better in the Reference Manual. Obsolete uses of the phrase "Complete Edition" were removed from a few places in the documentation. Thanks to Juergen Luethje. Various documents were fixed where miscellaneous 2.4 information has now become now obsolete. The Reference Manual said that the limit on nested include files was 10 deep. It should have said 30 deep. Thanks to Darkvincentdude. In the PD source interpreter, eu.ex, there was an error in the comments at the top. Thanks to Akusaya. The fact that crash_message() is now only useful for run-time errors was made clear. Thanks to Juergen Luethje. A bad HTML link to the WIN32 API .hlp file was fixed. Thanks to "Bro George". Many other minor clarifications were made. Version 2.5 Alpha Release November 15, 2004: New Features Source code for a complete Euphoria interpreter, 100% compatible with the official RDS Interpreter on all platforms, is now provided. See euphoria\source. It's written 100% in Euphoria and has the same front-end as the official RDS Interpreter. Since it's Public Domain, it may be used and modified for any purpose, including commercial or closed-source applications. It can be bound into a single executable file using the Binder, or translated with the Euphoria to C Translator to get a much faster executable. The official Euphoria Interpreter was re-written as 30% Euphoria (front-end), and 70% hand-coded C (back-end). It was formerly 100% C, and the boundary between front-end and back-end was fuzzy. The Euphoria Translator has been re-written as 100% Euphoria. It was formerly 100% C. It uses the same front-end as the Interpreter and the Binder. This reduces future maintenance costs, and helps catch subtle bugs (subscript out of bounds, uninitialized variable etc.) The free Public Domain Interpreter (ex.exe, exw.exe, exu), now includes full support for trace() beyond 300 statements, and for profiling. Thus there is no longer a registered "Complete Edition" interpreter. However, registration is still required for the Binder / shrouder. A new Binder was developed (100% in Euphoria). Since it shares the same front-end with the Interpreter and Translator, possible incompatibilities are avoided, and the future maintenance cost has been greatly reduced. A bound program can now provide a complete ex.err dump, without including any lines of source code in the .exe file. Bound programs now start up immediately with no parsing required. The Binder for Windows has a -con option, so you can make a console application. A separate Interpreter back-end executable was developed for use with the Binder. It executes intermediate code (.il files), and is smaller than the Interpreter, since it has no front-end (parser). This reduces the size of bound programs. A new $ symbol represents the length of the current sequence. Instead of saying s[length(s)], you can say s[$]. Instead of saying s[1..length(s)-1], you can say s[1..$-1]. More complicated expressions like s[i][$-5..$-1] are also possible. Note: In order to implement this feature properly, a small incompatibility with version 2.4 was introduced. A change was made to the order of evaluation of expressions in a multiply-subscripted assignment statement: lhs_var[lhs_expr1][lhs_expr2]... = rhs_expr This change will cause a problem only if you are trying to modify lhs_var via a function call, during the same statement that is assigning to lhs_var. You should change your code to perform any such function calls before you perform the subscripted assignment, e.g. temp = rhs_expr lhs_var[lhs_expr1][lhs_expr2] = temp The same would apply if one of the left-hand-side expressions contained a function call that tried to modify lhs_var. This situation is very rare (and pretty weird), but a few examples have been found. Programs now have the ability to get control after a crash (a Euphoria-detected or machine-detected run-time error). Using crash_routine() you can specify the routine id's of one or more Euphoria routines to be invoked when something goes wrong. You can save critical data to disk, inform the user, inform the programmer, etc. The library routines: put_screen_char(), get_screen_char(), save_text_image() and display_text_image() have been implemented for Windows text-mode consoles. These functions now work across all platforms. Suggested by C.K. Lester. Translator: All the files you need for translating Euphoria programs to C are now included in the main download packages for DOS/Windows and Linux/FreeBSD. You just need one or more of the supported free C compilers. Translator: The free Public Domain Translator (ec.exe, ecw.exe, ecu) now includes Euphoria statements as comments in the C source. It also supports trace(3) for debugging. When you register, you will eliminate the initial message and delay on compiled programs. Translator: Some new optimizations will speed things up, and also reduce the size of the C code. For example the code block:
              if expression then
                 ...
                 many statements of Euphoria code
                 ...
              end if
  will be completely deleted if the Translator can tell that expression will always be false. This can lead to further optimizations, such as a whole routine being deleted because there are no more calls to it. An example where this is useful is when there is different code for different platforms, e.g.
              if platform() = DOS then ...
- while expression and elsif expression can also be optimized in the same way. When the expression is always true, the if/while/elsif test and jump are eliminated. Translator: A couple of additional small improvements were made in converting the source from C to Euphoria. They allow for slightly better optimization. Translator: A minor adjustment lets the Translator produce slightly fewer C files, while reducing the slight risk of creating a huge C file that's too big for the C compiler to handle. Also, some empty .c files that were sometimes created, have now been eliminated. Translator: The Translator for Windows has a new -con option for making a console application. It's supported for each of the three Windows C compilers. Translator: After successfully building a .exe (or .dll) file, emake.bat will delete all the .c and .h files that were created by the Translator. This reduces clutter in the directory. The install program for DOS/Windows automatically creates exwc.exe, as well as exw.exe. ed: ed.bat has been changed. It now runs ed.ex using exwc.exe. Instead of using control-Home/control-End to move to the top/bottom of a file, use control-t/control-b. On Windows XP, this change gives ed faster keyboard response, and full support for long filenames. ed: A call to free_console() is made at the very end, so you won't see "Press Enter", as occurs on some Linux systems. The Interpreter exw no longer brings up a blank console window while performing trace(3). pretty_print() has a new option to limit the number of lines of output. Both types of slashes (backslash, forward slash) are now fully supported in pathnames on DOS and Windows. Backslash is the standard, but since Windows also supports forward slash in most cases, Euphoria also now supports either slash in all situations, not just a few situations as before. On Linux and FreeBSD only forward slash is supported. The -m486 option was removed from the gnuexu batch file used in building the Euphoria interpreter on Linux. It causes warnings and is not necessary. Bug Fixes bug fixed: with profile and similar with/without statements caused an error when followed immediately by a comment, with no whitespace before the start of the comment. Thanks to Daniel Kluss. bug fixed: ex.err would sometimes report the wrong value for a for-loop variable, when the for loop was used during a recursive call. Thanks to Pete Lomax. bug fixed: On Windows, using either the Interpreter, or translated code compiled by WATCOM, dir() caused an exception when given an argument that ended with "*.". This was due to a bug in the WATCOM routine used to implement dir(). Thanks to Daniel Kluss. bug fixed: In 2.4, on ME/98/95 the argument to dir() could no longer be a long file (or directory) name. This used to work in 2.3. (Note: On XP it can't be long). Thanks to Rangi and Juergen Luethje. bug fixed - Translator: On Windows when you create a Euphoria .dll, the global routines need to be called using the __stdcall convention. However indirect calls to those routines via call_func() and call_proc() from within the same .dll, were using the __cdecl convention. Thanks to Andy Serpa. bug fixed: An error message referred to "printf()", when it should have referred to "sprintf()". Thanks to Al Getz. bug fixed - safe.e: Poking an empty sequence into a 1-byte block of allocated memory caused a false-alarm error message. e.g. allocate_string("") Thanks to Bernie Ryan and Josef Jindra. bug fixed: If you called repeat() with a repetition count that was extremely close to the maximum size of a Euphoria integer (1073741823), you would get a machine exception. You will now get an "Out of memory" error from Euphoria. Thanks to Bob Elia. bug fixed - Translator: In some cases, when using the Translator to build a dll, WATCOM C would give the error message "statement required after label" near the end of EuInit(). Lcc also complained. Borland C did not complain, and things worked fine. Thanks to Matthew Lewis. bug fixed - Interpreter: In programs larger than a couple of thousand statements, an assignment operation with subscripting on the left might cause a machine exception. The chance of this happening was about 1 in 1000. Any change to the program that shifted the offending statement's position in memory would cause the bug to go away. For example,
              x[i] -= y
- This bug has been lurking since January 1999 (version 2.1 alpha). The Translator was not affected. Thanks to Pete Lomax. bug fixed: On Windows, Linux and FreeBSD, when reading standard input, and an input line was longer than 1040 characters, gets() would set the 1041st character to 0. DOS was OK, and files other than standard input were ok. bug fixed - EDS: When db_open() opened a database file but failed to secure an exclusive or shared lock on the file, it was neglecting to close the file before returning a failure code. bug fixed - ttt.ex: A moderately-long human name would damage the board grid. Thanks to Igor Kachan. bug fixed: The line number reported for run-time errors occurring in a short-circuited if-statement could be off slightly. Thanks to Kat. bug fixed - Translator: The range of return values assumed for getc() was [0,255]. It should have been [-1,255]. bug fixed - Translator: The generated C code failed to free the storage for the for-loop variable when a return statement was executed inside a for-loop, and the loop variable had a non-integer value. A similar problem could occur when there was an else, exit or end while immediately after the for-loop, and the loop variable value was not an integer. Documentation A document on CGI Applications in Euphoria has been added. Thanks to Kenneth Rhodes, db_rename_table() is now documented. This had been accidentally left out of the EDS documentation. It's now mentioned that format strings in pretty_print() could have additional text along with the format. Thanks to Juergen Luethje. The Reference manual now says that hex literals, such as #FFFFFFFF, are never considered to be negative numbers. Thanks to Juergen Luethje. sprintf()/printf(): It's documented that -1 prints as FFFFFFFF in %x format. Thanks to Juergen Luethje. Version 2.4 Official Release July 3, 2003: define_c_proc() and define_c_func() have been extended, so in addition to defining C routines in external .dll's and shared libraries, you can now define the parameters and return value for a machine-code routine that your program pokes into its own memory. You can call the machine-code routine using c_proc() or c_func(). Thanks to Daniel Kluss. Performance Improvement: get4() and put4() in database.e have been speeded up slightly. They are very important to the overall speed of EDS. Thanks to Derek Parnell. Performance Improvement: get_bytes() is now much faster when the number of bytes requested far exceeds the number of bytes remaining in the file. Thanks to Pier Feddema. Translator: When translating a huge Euphoria routine (many hundreds of Euphoria statements), the Translator will now output calls to a dereference routine, rather than using in-lined C statements. This reduces the chance of exceeding a size limit imposed by the C compiler (especially Watcom C). It also reduces the .exe size. Since the dereference routine is more likely than the in-lined statements to be in cache, the speed difference is not that great. Interpreter Source Code: In watexw.bat, runtime windows=4.0 was added to the link command for building exw.exe. There are now some checks for invalid argument type and invalid return type in calls to define_c_func() and define_c_proc(). Some syntax error messages are now more descriptive when namespace identifiers are involved. The filesort.ex tutorial program was altered to make it more usable under Linux and FreeBSD. By default, safe.e now does a less-strict, "edges-only" check for memory corruption, when the platform is WIN32. Windows programs often access memory that was not allocated using Euphoria's allocate(). bug fixed: When a literal floating-point constant in the Euphoria program was larger than about 1e308, the Translator would output "inf" in init_.c. This caused the C compiler to issue an undefined symbol error. Thanks to Juergen Luethje. bug fixed: In a rare case, the Translator was failing to emit C code to make a copy of a sequence with multiple references to it, before overwriting an element of that sequence. Thanks to Juergen Luethje. bug fixed: In certain cases, when a Euphoria program exchanged Euphoria data with a .dll written in Euphoria, the data might not be freed (until the program terminated). Thanks to Wayne Overman (Euman). bug fixed: If you used "asm" in your program, as a private variable or parameter name, the Translator would use "_asm" in the C code. This was not acceptable for some C compilers. The Translator will now avoid using "_asm", as well as "_try", "_Seg16", "_stdcall" and several other single-underscore names that are reserved by various C compilers. Thanks to George Papadopoulos and Matt Lewis. bug fixed: If the HOT_KEYS parameter in ed.ex was set to FALSE, then Esc h Enter would not bring up the help prompt. Thanks to J. Brown. Version 2.4 Beta-test Release April 10, 2003: This release updates the Euphoria Interpreter, the Euphoria To C Translator, and the Interpreter Source Code products, for Windows, DOS, Linux and FreeBSD. New Features bind and shroud now have an option -out for specifying the output file, so you won't be prompted for it. Thanks to Jonas Temple, Rusty Davis and others. bind and shroud now have an option -quiet that suppresses normal messages and statistics, and therefore eliminates the window that normally pops up. Only errors are reported. Thanks to Jonas Temple. The namespace error message that's issued when you refer to a global symbol that's defined in two or more files, now gives you a list of all the files where that symbol has been defined. Thanks to Derek Parnell and Irv Mullins. Translator: In many cases, the C code generated for remainder(), integer multiplication, and compare() is smaller and faster. exw, ecw -wat: Deallocation of space for huge numbers of small objects (atoms or small sequences) is much faster than in 2.4 alpha. Thanks to Andy Serpa. (Note that allocation of huge numbers of small objects in exw, or ecw -wat, became much faster in 2.4 alpha, and remains much faster.) When an ex.err file is created, any warnings issued against the program will be listed at the end of the ex.err file. Thanks to Al Getz. The file name is now included in the warning message that you get for some of the common warnings (variable not used, variable not assigned to). Thanks to Al Getz. New Icon: On Windows, Euphoria include files are now labelled with a gray-scale version of the Euphoria E) icon. This lets you easily distinguish the executable Euphoria files from the include files. Thanks to Wolfgang Fritz. Out-of-bounds floating-point subscript values were being reported after rounding down to an integer. Now the value before rounding is reported. Euphoria Database System (EDS): db_rename_table() now checks to see if the target table name already exists, before it renames a table. Thanks to Mike Nelson. The first value returned by rand() (in the absence of set_rand()) is now more "random". Thanks to Aku. Bug Fixes bug fixed: Due to a change made in 2.4 alpha, the dir() routine for Borland and Lcc was concatenating the file attributes characters (if any) to the file name field. Thanks to Dr. Juan R. Herguijuela. bug fixed: No error message was issued when ',' was followed immediately by ')' in a routine's parameter declaration list. Thanks to Brage Moris. bug fixed: Huge positive out-of-bounds subscripts (over 2 billion) were reported as huge negative values. bug fixed: repeat(0, size), where size was a huge positive floating-point number, incorrectly reported: "repetition count must not be negative". Now it reports: "repetition count is too large". Thanks to Martin Stachon. bug fixed: machine_proc(x, 5), where x was a huge floating-point number, incorrectly reported: "an integer was expected, not a sequence". Now it reports: "The first argument to machine_proc/func must be a small positive integer". Thanks to Martin Stachon. Version 2.4 Alpha-test Release February 21, 2003: New Features Most machine-level exceptions (peek/poke to bad addresses etc.) in both the main program and in .dlls, are now caught by exw and exu, and reported in the usual way, with a full traceback and ex.err variable dump. This is a great improvement over the cryptic machine-level messages you used to get (and still get when using compiled languages, and most interpreted languages) about "segmentation violation", "illegal instruction" etc.). Thanks to Martin Stachon. In addition to __stdcall, the C __cdecl calling convention is now supported for calls to C routines in .dll's and also call-backs to Euphoria routines from C code. Euphoria's support for DOS long filenames has been extended to Windows XP. The trace screen shows you large sequences in pretty-print display on a separate screen. You can scroll through the whole sequence. pretty_print() was added to misc.e. It lets you display Euphoria objects with a nice, readable structured display, and many formatting options. Pretty-printing of sequences is now done in ex.err, the ? command, and db_dump(). Euphoria Database System (EDS): db_rename_table(name, new_name) was added to database.e. This routine was submitted by Jordah Ferguson, and included with only trivial changes. Linux/FreeBSD: system() no longer initializes curses when there is no console window yet. Thanks to Daniel Johnson. The number of levels of nested include files has been raised to 30 (from 10). Thanks to Tone Skoda. Include statement path names can have double-quotes around them, so paths containing blanks can be handled correctly. This was actually implemented for 2.3 but never documented. exw.exe, and any executables produced by the Translator with Watcom, now have the subsystem set to 4.0 instead of 3.1. This improves the appearance of GUI's in some cases. The utility make31.exw will create a version of exw.exe that supports Windows GUI 3.1 as before, in the unlikely case that there are compatibility problems with Euphoria 2.3. Thanks to H. W. Overman, Brian Broker and others for recommending this change. makecon.exw - will create a version of exw.exe that operates as a console application - no console window is popped up, and stdin/stdout can be redirected trace(1 2 and 3) are now allowed with bind -clear (still not allowed with shrouded bind for security reasons). Thanks to Jonas Temple. Translator: You can now make a Euphoria .dll using Lcc and interface it with interpreted programs running under exw, and translated programs using Borland and Watcom. Previously, the main program had to also be compiled with Lcc. The Translator no longer uses the -m486 or -mpentium options available with GCC and DJGPP. These options were causing warnings, and the C compiler apparently sets the machine model correctly by itself. Thanks to Kenneth Rhodes. The Translator will now perform automatic calls to user-defined types, in the unusual case where the type routine has side-effects (it sets global variables, performs I/O etc.). Thanks to Andy Serpa. euphoria\demo\bench compares the Euphoria Interpreter and the Euphoria To C Translator against more than 20 other interpreted languages. Porting Activity We ported the Interpreter and Translator to FreeBSD. The source now has several C #ifdef's for FreeBSD. Andy Cranston has ported Euphoria to HP Unix, and he plans to do Sun Unix. Optimizations - Interpreter - Typical large slices are faster. About 30% faster for slices from about 100 to 50000 in length. (Overhead dominates for smaller slices, and lack of caching affects larger slices.) This assumes the slice is mostly integers (usually true), and an actual copy of the data is made (usually true since v1.4b). Statements that contain multiple & concatenations are much faster.
              e.g. instead of:
                   result = a & b & c
                   being evaluated as:
                     1. copy a and b into temp
                     2. copy temp and c into result
                        (a and b are effectively copied twice!)

                   We now do:
                     1. copy a and b and c directly into result
- So there is less copying of data and fewer temp sequences to create. The more & operators in an expression, the greater the speed-up. e.g. with 3 & operators some of the data was copied 3 times, etc. Jordah Ferguson pointed out that this was slow. The time overhead involved in calling and returning from a Euphoria call-back routine has been reduced by about 10 percent. In exw and ecw -wat, allocation of space for large numbers of objects is faster. It can be tremendously faster when hundreds of thousands or millions of objects are involved. Better UPX compression has chopped a few K off exw.exe vs. 2.3 (even though new code was added). Thanks to Wolfgang Fritz - Euphoria Database System - Keys and records are read faster due to a faster decompress() routine. Almost twice as fast when the key or record data to be retrieved consists mainly of sequences of characters or small integers. This case is quite common. Allocating new space in a database is much faster, up to 4x faster, especially in large databases with a large list of free blocks Inserting and deleting records in huge tables is now much faster. Combined with the speeded-up slices in Euphoria 2.4, database.e is now about 25% faster for a table with 10,000 records and over 3x faster for a table with 100,000 records. This really only matters if you are trying to insert/delete hundreds of records per second. In the typical case of a human operator entering data via GUI, you would never notice the insert/delete time for one record (a few milliseconds). Derek Parnell pointed out the slowness. db_select_table() is significantly faster. get4() is faster which speeds up everything. - Other Optimizations - bytes_to_int() in machine.e is now more than twice as fast. gets() is about 5% faster sort() and custom_sort() are a few percent faster. Thanks to Ricardo Forno for tweaking the Shell sort algorithm. Several additional optimizations have been added to the Translator. It produces executables that are faster and smaller than version 2.3. The 2.4 Translator has been successfully tested on hundreds of thousands of lines of Euphoria code, and there are currently no known code generation bugs. Some Translator benchmark results are in euphoria\demo\bench. Bug Fixes - Source Code - bug fixed: The gnubsd batch file referred to syncolor.c and syncolor.o. (gnuexu was ok.) bug fixed: Karl Bochert pointed out a necessary C coding change to make poke() work with the latest version of Lcc. The change corrected the Translator (with recent versions of Lcc) and the Interpreter Source Code (compiled with Lcc) - Interpreter - bug fixed: A crash might occur in situations where a call-back routine indirectly called itself recursively. Thanks to Matthew Lewis and George Papadopoulos. bug fixed: In for-loops at the top-level of a program (outside of any routine), that incremented the loop variable by an integer other than the default of +1, end for was taking up to 15x longer than necessary due to a bug fix that was made back in November 1999. Only the end for itself was slow, not the code contained in the body of the loop. Antoine Tammer detected this. bug fixed: On XP, when you open a new DOS window that has more than 25 lines, the Virtual DOS Machine (VDM) is at first confused about the true number of lines. The first time (only) when you ran a Euphoria program in that window, if you ran it near the very bottom of the screen, the output might disappear, or the VDM or Euphoria might report an error etc. Euphoria (ex.exe) now detects the rare cases when VDM is confused and clears the screen, which clears up the confusion. A similar problem existed on NT, and was fixed a few years ago. bug fixed: The interpreter was referring to "call back from Windows" in ex.err, even on Linux or FreeBSD. It now says "call-back from external source" on those systems. Thanks to Pete Eberlein. bug fixed: When an include file couldn't be found, the error message referred to "euphoria\include". It now uses %EUDIR%\include bug fixed: An error message will no longer be generated on any platform for without profile_time. Thanks to Alan Oxley. - Translator - bug fixed: When assigning the result of an arithmetic calculation (typically multiply) involving two integers, to a variable declared as atom, where the atom variable had already (in the same basic block) been assigned an integer value, the Translator might not output any code to check for integer overflow (result outside of +/- one billion). This could cause a crash. Thanks to Andy Serpa. bug fixed: DJGPP strip.exe command in emake.bat would fail on XP,2000 due to a bug in DJGPP. Now emake.bat has: SET LFN=n to work around the bug in strip.exe bug fixed: Translated code compiled with Borland C was not producing INF's and NAN's, like Watcom and Lcc. Rather, it was crashing when a floating-point overflow (over 1e308), or an undefined f.p. result was calculated. The Interpreter Source Code was also corrected for those who wish to compile exw.exe using Borland. Thanks to Andy Serpa. bug fixed: In the first basic block of a Euphoria routine (i.e. before any control-flow statements), peek4u(), peek4s(), and the "add integer 1" operation, would sometimes neglect to check for possible 31-bit integer overflow when assigning to a private variable declared as atom, unless the variable had been previously initialized. Thanks to Mike Duffy. bug fixed: In some cases, when assigning a sequence element to a variable declared as integer, and known to have an integer value at this point, the case where the element was an integer value stored in C double form was not handled correctly. bug fixed: In rare cases, the translator might output two unary minus operators in a row, which would be parsed by a C compiler as the C decrement operator "--". bug fixed: Euphoria .dll's were not always correctly freeing storage allocated by the main program, and vice versa. Memory could be wasted, and you might get a machine-level crash. Thanks to H. W. Overman. Note: Due to this fix, any Euphoria .dll's created with the Translator version 2.3 or earlier, must be re-translated with 2.4, and re-compiled, in order to interface with the Euphoria 2.4 (or later) interpreter or translated code. New .dll's created with version 2.4 or later, will not work with the interpreter version 2.3 or earlier, except in trivial cases. bug fixed: The sleep(x) function was only sleeping for x milliseconds when using the Lcc run-time library. It now sleeps for x seconds, to conform with the Euphoria documentation for sleep(). Thanks to Wolfgang Fritz. bug fixed: On some versions of Linux, a translated/compiled Euphoria program would crash if standard output was redirected, e.g. for CGI bug fixed: On some versions of Linux, a translated/compiled Euphoria program would crash if machine(M_GET_SCREEN_CHAR, {row, col}) were called. bug fixed: In some cases the code was not correct when an integer variable was assigned the unary minus of an atom variable. bug fixed: In a very rare case, an uninitialized value in memory might be used to determine if a literal floating-point value should be treated as an integer or not. Incorrect code could result. - Binder - bug fixed: The binder would crash after seeing a comment with no new-line character, just EOF, on the last line of a file. Some versions of Win32Lib.ew had this. Thanks to Henri Goffin. bug fixed: The usage report of bind/shroud still said "-scramble", instead of "-clear" and had other errors for Linux/FreeBSD. Thanks to Chris Bensler. bug fixed: bind/shroud -clear might neglect to rename a private variable, when an earlier local variable gets renamed into the same name. Thanks to Pete Lomax. bug fixed: When an include file was missing \n on the last line, bind/shroud -clear might neglect to leave some whitespace before the next word in the main file. Thanks to Pete Lomax. bug fixed: If you defined a constant that was never used, and it was defined using an expression that contained a binary minus operator, a syntax error could occur in the bound or shrouded file that you create. Thanks to Chris Bensler. - Library Routines - bug fixed: walk_dir("/",...) would fail on Linux. Thanks to Ricardo Forno. bug fixed: db_compress() of EDS had an error if the database file or it's path contained a blank character. A blank is ok now on all platforms except DOS. Thanks to Virtual B. bug fixed: wildcard_file() in euphoria\include\wildcard.e is now case sensitive on Linux/FreeBSD (but is still case insensitive on DOS/Windows). Thanks to Jeff Fielding. bug fixed: dir() was not always reporting file sizes greater than 1 Gb correctly. It now handles up to 4 Gb. Arithmetic performed on the file size would probably fail. Thanks to Ricardo Forno. bug fixed: where() was not always reporting file positions greater than 1 Gb correctly. Arithmetic performed on the position would probably fail. It now handles up to 2 Gb. bug fixed: ex, exw, ec -wat, ecw -wat: The dir() function for DOS and Windows was not handling wildcards correctly when a backslash appeared at the end of the file or directory path. Thanks to Juergen Luethje. - Namespace Feature - bug fixed: If you tried to declare a new variable, using a namespace qualifier, e.g. integer y:x (which is illegal) it wouldn't complain, and would just ignore the "y:" part, as long as y:x was a routine (not a variable) in an earlier file. This is now caught as an error. Thanks to Martin Stachon. bug fixed: When declaring the type of a parameter, using a global type that was defined in more than one file, you would get an unclear error message stating "a type is expected here". Now you'll get a message pointing out that the type requires a namespace identifier to resolve it. Thanks to Juergen Luethje. bug fixed: The error message that you get if you specify a namespace qualifier and a ':', but you neglect to follow it with a properly-formed identifier, has been improved. Thanks to Carl White. - Demo Programs - bug fixed: In the window.exw demo program, allocate(64) and allocate(16) caused a storage leak. Thanks to Wolfgang Fritz and Jordah Ferguson. - Trace/Debug - bug fixed: When trace(0) was executed, followed later by trace(1), with no screen I/O in between, the values of some variables on the trace screen were not updated. Thanks to Ricardo Forno. bug fixed: with trace / with profile / trace(3), used all together, produced garbage source lines in ctrace.out. Thanks to Kat. Version 2.3 Official Release February 11, 2002: This release updates the Euphoria Interpreter, the Euphoria To C Translator, and the Interpreter Source Code product, for all platforms. The DJGPP version of the interpreter source code now uses GNU C's dynamic labels, just like the Linux version. This allows it to achieve full speed, without the need for any assembly-level tweaking. Thanks to Bernie Ryan. The Interpreter Source Code now includes an overview document describing how the interpreter works. In the Complete Edition, bind.bat and bindw.bat now use exw to run the binder/shrouder. This avoids problems with long filenames on some systems. A console window will appear while the binder/shrouder is running. Thanks to "void", Bruce Axtens, and others. bug fixed : Due to a bug in the WATCOM 10.6 C library, the ex and exw interpreters, and code translated to C and compiled by Watcom, might get the wrong result from Euphoria's where() function when the file was opened in append mode, and the file pointer was in the uncommitted (not written to disk yet) portion of the file. The bug has been worked around by having Euphoria flush() the file in this particular case, before calling the Watcom routine. Thanks to Bob Elia. bug fixed : A bug introduced in the binder for 2.3 beta, might cause a function call on the last line of a program to be ignored. Thanks to Wolfgang Fritz. bug fixed : Several Euphoria files in the WIN32+DOS32 distribution had Linux-style line terminators (\n only). This made them hard to view using NotePad and some other editors. Thanks to Pete Lomax. bug fixed : If "with type_check" was turned on, ed.ex would get a type_check failure when the Esc key was pressed. Thanks to Kenneth Orr. Version 2.3 Beta Release January 15, 2002: This release updates the Euphoria Interpreter, the Euphoria To C Translator, and the Interpreter Source Code product, for all platforms. You can now override a Euphoria built-in routine with your own variable or namespace identifier of the same name. Previously this was only allowed for user-defined routines. Besides giving programmers more freedom, it will allow RDS to add new built-in routines in the future without breaking existing code. The warning about having multiple global symbols with the same name in different source files has been removed. It was felt to be unnecessary since you'll be asked to supply a namespace identifier if you actually make an ambiguous reference to a global symbol. You can now have a trailing \ (or Linux /) on the end of all directory names in EUINC, and you can have blanks in the directory name. To eliminate confusion, the binder/shrouder will now delete the output file if a fatal error occurs during the bind or shroud. Numerous improvements and corrections were made to the documentation. Thanks to Igor Kachan. Old, pre-ANSI function definitions in the interpreter source code, have been updated to ANSI-style, which is more compatible with C++. bug fixed : With DJGPP C, when compiling code produced by the Translator, or compiling the Interpreter source code, there was a memory allocation bug that could waste a bit of time, or, in rare cases, cause a crash. bug fixed : On Windows, using the Interpreter, or a Translated program, you were sometimes required to hit Enter twice to exit from a console window. Thanks to Tone Skoda. bug fixed: The Euphoria dir() function, as implemented for Lcc or Borland, did not handle directories properly when they had extra attributes set, such as READ_ONLY. Thanks to Euman, who encountered the problem, and then showed how to fix the Interpreter source code for dir(). bug fixed: You can now declare a namespace identifier with the same name as a built-in function, without causing a lot of errors. Thanks to Martin Stachon (although he recommended a different solution). bug fixed - Binder: Support for the new EUINC environment variable has now been added to the binder. Thanks to Ross Boyd. bug fixed - Binder: Appending resource files to a bound .exe didn't work correctly when bind -clear was used. Thanks to Wolfgang Fritz. bug fixed - Binder: When using the binder interactively, you would get a "variable not initialized" error when trying to substitute a different Windows icon. Thanks to Tony Steward. bug fixed - Binder: In some cases the keyword "constant" would be dropped from the shrouded output, when the previous line of input had a constant declaration ending in ']'. Thanks to Ross Boyd. bug fixed - Binder: When a general expression, (not just a string in quotes), was used as the argument to routine_id(), local routines that were potentially the target of that expression, might have their names changed (unless -clear was used), thus causing routine_id() to return -1 at run-time. Global routines were ok. bug fixed - Binder: The binder/shrouder kept going even though an include file was missing. Thanks to Ross Boyd. bug fixed - Linux Binder: The Linux search path bug for bound executables, supposedly fixed by the 2.3 alpha release, wasn't fixed properly. Fixed now. Thanks to Kenneth Rhodes. bug fixed - Linux Binder: bindu -clear and shroud -clear with a file containing DOS/Windows-style \r\n line terminators gave you errors "illegal character" when your shrouded program was run, and "not bound correctly" when your bound file was run. bug fixed - Interpreter Source: The link command for building the DOS interpreter with WATCOM C, listed a non-existent .obj file. Version 2.3 Alpha Release November 30, 2001: This release updates the Euphoria Interpreter for WIN32, DOS32 and Linux. It also updates the Euphoria To C Translator for all platforms, and it introduces a new product - the Euphoria Interpreter Source Code. The registration incentives and prices have changed. The Interpreter product now has just one option: WIN32, DOS32 and Linux, formerly $59, for just $39. The Interpreter source code (minus a few registered features) is now available for $49. See the source license and register.doc for more details. The Translator continues to cost $29. When Public Domain users reach 300 statements, they will no longer lose the run-time error diagnostics. They will only lose the trace() facility. register.doc has more details, including the requirements for getting a free upgrade. The Euphoria interpreter can now be built successfully by 6 different C compilers on 3 platforms. New namespace qualifiers eliminate naming conflicts between identical global symbols declared in different include files. Also, local symbols will now override global symbols of the same name, rather than causing an error. See Scope Rules. The Complete Edition Interpreter product comes with a new 2-pass binder/shrouder that eliminates all unused routines and constants, resulting in smaller executable files. It also has an option to bind clear source, so you can get understandable error messages from your users. A new environment variable, EUINC, has been introduced. If present, it specifies a list of additional directories that will be searched for include files. The directory containing the main file is always searched first, then the directories in EUINC, then euphoria\include. The Interpreter now supports a new trace mode, trace(3). It logs all executed Euphoria statements to a file, so you'll be able to see the last statement that was executed at the time of any crash, as well as the 499 statements that preceded it. This is particularly helpful in the case of machine-level crashes where Euphoria is unable to write an ex.err file. Thanks to Matthew Lewis. The Euphoria interpreter can now pass Euphoria data - atoms and sequences, to .dll files coded in Euphoria and built by the Translator. Use the new E_ types in dll.e On Linux we added RTLD_GLOBAL on the dlopen() call. This lets you link successfully with more shared libraries. On Linux, when using the #! feature on the first line, to make your source file directly executable, you no longer need a .exu extension on your file. Linux programmers often prefer to have no extension on their executable files. Windows callback routines written in Euphoria can now take 9 arguments (was 8). Thanks to Matt Lewis. In addition to C_DOUBLE (8-byte floating point), C_FLOAT (4-byte floating-point) is now supported for arguments and return values from C routines. Thanks to David Guy. Windows .dlls opened with open_dll() are now closed automatically when your program terminates. This avoids a tiny bit of memory leakage. Thanks to Euman. safe.e has a new option to check just the edges of registered blocks and not complain if other blocks of memory are used. get_bytes() is 30% faster. allocate_string() was speeded up. Thanks to Aku. The mydata.ex demo program now uses an EDS database. bug fixed - Translator: When a global or local variable containing a sequence or floating-point number was assigned the result of a function, and at some point during the function call the global or local variable was overwritten, some corruption would take place, leading to a probable crash later in the program. Thanks to Sergio Gelli. bug fixed - Linux Interpreter: programs of more than a few thousand lines had a chance (maybe 20%) of having one of their statements crash whenever it was executed. bug fixed - Interpreter: s[i][j]...[k] = s caused the interpreter to crash. i.e. an assignment of an entire sequence to an element of an element of itself using 2 or more levels of subscripting. Thanks to Henri Goffin. bug fixed - Linux binder: (Kenneth Rhodes) Bound executable programs stored somewhere on the search path would not run properly unless they were in the current directory or unless you specified the full path to the executable. bug fixed - Binder: "with profile_time" in a bound or shrouded program would cause a crash bug fixed - DOS Interpreter: In image.e, put_screen_char() has been corrected to have: if overflow > 0 then ... instead of: if overflow then ... bug fixed - Interpreter: A time optimization for slicing could in rare cases cause a lot of wasted space. The optimization has been adjusted to handle those cases. Thanks to Brian Clausing. bug fixed - safe.e: free() and free_low() were not actually freeing the block of memory, and on Linux free() could cause a segmentation violation. The same routines in machine.e were ok. bug fixed - Translator for DJGPP: A couple of minor differences from ex.exe in the display of text were corrected. bug fixed - define_c_var(): works on WIN32 too. The documentation was corrected. Euphoria to C Translator Official Release June 5, 2001: A couple of minor enhancements and bug fixes. Euphoria to C Translator Beta-2 Release May 8, 2001: You can now use the translator to make a .dll file. Euphoria to C Translator Beta-1 Release February 15, 2001: Some bugs were fixed. Smaller, faster C code is produced. Euphoria to C Translator Alpha-4 Release December 14, 2000: Pixel-graphics and mouse support was added for DJGPP C. Euphoria to C Translator Alpha-3 Release November 27, 2000: Some bugs were fixed. Some new features were added. Borland C++ is now supported. Euphoria to C Translator Alpha-2 Release October 26, 2000: Support for the Lcc C compiler for Windows was added. DJGPP C (DOS) is partially supported (no pixel graphics). Euphoria to C Translator Alpha Release September 6, 2000: The first release of the translator. It supports Euphoria version 2.2. It relies on WATCOM C for DOS and Windows, and GNU C for Linux. Prime sieve runs 3.2x faster than with the interpreter. Shell sort runs 4.5 times faster. Version 2.2 Official Release for WIN32+DOS32 January 14, 2000: Better error messages are now issued from the interpreter, and from the bind program, for some typical errors that users can make when binding a program. The documentation has been improved in a few places. The window.exw demo program shows how to load the Euphoria icon contained in exw.exe. Language War uses Jiri Babor's improved version of putsxy.e. Version 2.2 Beta Release for WIN32+DOS32 December 23, 1999: Most of the new library routines developed for Euphoria 2.2 on Linux, have now been ported to WIN32 and DOS32. These are: sleep(), chdir(), flush(), lock_file(), unlock_file(), crash_file(), get_screen_char() and put_screen_char(). For a description of these routines refer to the Linux release notes below, or LIBRARY.DOC. Some cross-platform bug fixes and other miscellaneous improvements were made during the Linux port. These bug fixes and improvements have now been ported back to WIN32+DOS32. See the Linux release notes (below). In addition, the following improvements have been made specifically for WIN32 and DOS32: exw.exe now contains a Euphoria icon that is displayed automatically by Windows. The icon was contributed by Gary Dumer. Registered users may change this icon when they bind a program. exw.exe is now a compressed executable of just 73K (or so). It's compressed using the UPX compression tool for .exe files. ex.exe has been updated with the latest release of the CauseWay DOS extender. A problem where CauseWay would sometimes limit you to 64Mb of memory under some DOS configurations has been eliminated, and a few other minor bugs were fixed. bug fixed: The error traceback could sometimes crash or be misprinted when a type_check failure occurred. It could only happen when 1 was added to an expression, and the non-integer result of the expression was assigned to a variable declared as integer. bug fixed: If text_rows() was called as the first routine needing a WIN32 console window, Euphoria would fail to set the new number of lines of text on the console. Version 2.2 Official Release for Linux November 22, 1999: All platforms: bug fixed: If a Euphoria routine called itself recursively from inside a for-loop, and at one level of recursion the for-loop counted up to an upper limit, and at another level of recursion the for-loop counted down to a lower limit, the for-loop would probably malfunction at one of the levels. Thanks to Delroy Gayle. The documentation was improved in many places, especially with respect to the Linux platform. Version 2.2 beta-test release for Linux October 22, 1999: Most of these features and bug fixes will also be made available in Version 2.2 for WIN32 + DOS32. platform() has been moved from misc.e into exu to eliminate the function call overhead. platform() now takes zero time to compute. The compiler simply plugs in the appropriate constant value. lock_file() and unlock_file() have been added to allow multiple processes to share access to files. This can be important in CGI programming and other areas. flush() will force the contents of the memory buffer out to a file or device. chdir() will change to a new current directory and let you know if it was successful. sleep() will suspend execution of your program for a number of seconds, and let the operating system schedule another process. put_screen_char() will write a character and its attributes (colors etc.) to the screen. get_screen_char() will read a character and its attributes from the screen. save_text_image() now works on Linux (as well as DOS32). It copies a rectangular text image from the screen. display_text_image() now works under Linux (as well as DOS32). It writes a rectangular text image to the screen. The "short-circuit" warning now gives the filename and line number of the possibly short-circuited call. Minor clarifications were made in some other error messages as well. Minor improvements were made to ed and search. A portability problem in how2reg.ex was fixed. exu is compressed better. It's actually a bit smaller now, although functionality has been added to it. Version 2.2 alpha-test release for Linux August 24, 1999: Many of these features and bug fixes will also be made available in Version 2.2 for WIN32 + DOS32. The documentation has been brought up-to-date to include Linux-specific information for library routines and Euphoria in general. There is now a Complete Edition for Linux, including binding and shrouding. See register\register.doc. There is now text mode mouse support using get_mouse(). You must have GPM server running. It works in a text console or an xterm window. Linux: define_c_var(name) will return the address of a global C variable in a shared library. It was confirmed that you can call Euphoria routines from Linux C routines using exactly the same mechanism as in WIN32 Euphoria. See euphoria/demo/linux. An example of creating your own shared library routines and calling them from Euphoria was added. See euphoria/demo/linux. All platforms: crash_file(file_name) will cause diagnostic messages to be written to file_name instead of ex.err. You can use crash_file("/dev/null") to get diagnostics on screen but not in a file. crash_file("") means "no diagnostics" (to screen or ex.err). Trace mode in xterm now detects the F1/F2 keys. time() now reports real "wall-clock" time, not CPU time. search, guru and cdguru now place their output in your $HOME directory instead of the current directory. #! is now restricted to just the first line of a file. All platforms: In ed, the Esc n, Esc d, Esc f and Esc r commands will immediately redisplay your last choice. You can press up-arrow/down-arrow to see other choices, or clear the choice. If you start typing without editing, it will clear the choice and take your new input. free_console() will set the terminal parameters back to normal. Normally, when running a Euphoria program the parameters are set the way that curses wants them and they are set back to normal when the program terminates. If your program needs to terminate in a strange way (other than calling abort()), free_console() should be called first. bug fixed: get() now considers '\r' to be a whitespace character. This is important when reading DOS files. All platforms: bug fixed: It was not immediately issuing a type_check failure when 1 was added to an integer variable that was set to the maximum value for an integer (1.07 billion). Thanks to Jeff Fielding. All platforms: bug fixed: It was not always detecting an improperly-formed exponent on a floating-point number. Thanks to Lionel Wong. All platforms: The performance of the storage allocator has been improved in certain cases. A bug that could cause the interpreter to crash when you are almost out of memory has been fixed. Version 2.2 pre-alpha #4 for Linux July 15, 1999: You can call C routines in Linux shared libraries (.so files). See euphoria/demo/linux/callc.exu for some examples. If your program does not output anything to the xterm window, exu will not issue the "Press Enter" prompt. All platforms: ed now lets you recall previous top-line command text using up-arrow and down-arrow, similar to doskey in DOS and the shell history in Linux. This works with any strings that you type for Esc n (new file), Esc d (Linux command), Esc f (find string) or Esc r (replace string). In addition, you can now use arrow keys, Home, End, Delete etc. to edit strings before you press Enter. Version 2.2 pre-alpha #3 for Linux July 8, 1999: In an xterm window, exu will prompt you to hit Enter before it exits. Without this, xterm restores the screen so fast that you don't see any output or error messages. An internal coding change was made to Euphoria's rand() function. (The algorithm has not changed.) Hopefully this will allow rand() to work on all distributions of Linux. Please let us know if rand() still fails. ed: The Esc h command will display the Euphoria help files. This was broken in pre-alpha#2. In an xterm window, Euphoria's video_config() now reports the correct number of lines and columns - this helps ed to work much better. ed will work with the initial size of window in effect when ed starts up. ed: F1, F2, F3, F4, Home, End, and the Delete key work now in xterm (under Red Hat 5.2 at least). The other F-keys were already working. PageUp/PageDown and some other keys still don't work - feel free to add your own alternate keys. exu is now even smaller - just 82K. Version 2.2 pre-alpha #2 for Linux July 6, 1999: The ncurses library has been statically linked into exu. exu is now a compressed executable (97K). bug fixed: ed can now edit files with upper case letters in the name. The fraction of a second delay when you press the Esc key in ed has been removed. Version 2.2 pre-alpha #1 for Linux July 1, 1999: The first version of Euphoria for Linux was released. Version 2.1 Official Release for WIN32 + DOS32 March 29, 1999: Updates to the trace screen have been optimized. Unnecessary refreshes of the source code, and the variables on the trace screen, have been eliminated. When a refresh is necessary, it is now slightly faster. This makes a noticeable difference in exw.exe, and also in ex.exe in pixel-graphics modes. For ex.exe in text modes, it reduces screen flicker slightly. The install program no longer requires that your PATH be less than 128 characters. It will simply warn you if it isn't. Newer versions of DOS allow for a longer PATH. Thanks to Steve Adams. An extra error check was added to unregister_block() in safe.e. Thanks to David Guy. Version 2.1 beta-test release March 5, 1999: The rest of the files in the euphoria\doc directory have now been converted to HTML. Every .doc file in the doc directory now has a corresponding .htm file in the euphoria\html directory. Many improvements and clarifications were made to the documentation. You will now be warned when you have code that comes immediately after an exit, return or abort() statement. This code can never be executed. Suggested by Gabriel Boehme. safe.e no longer includes graphics.e. This eliminates possible naming conflicts when safe.e is substituted for machine.e. Using code supplied by David Guy, safe.e will now let you add or remove externally-allocated blocks of memory on the "safe address list". See the new library routines: register_block() and unregister_block(). message_box() now uses the handle of the active window rather than NULL. This forces the user to reply to your message before he can continue to interact with your program. He won't be prevented from interacting with other programs. Thanks to Austin C. get() and value() have been sped up by a further 5% thanks to Gabriel Boehme. exw.exe has been made less likely to crash mysteriously when attacked by a virus. sanity.ex now checks your installation of Euphoria. You'll be warned if your PATH or EUDIR variables are not set, or your ex.exe, exw.exe, pdex.exe, or pdexw.exe files have been corrupted or not installed correctly in euphoria\bin. The security of bound and scrambled programs has been tightened some more. Thanks to Rusty Davis. To save space in euphor21.zip, the install program now generates the HTML and DOC files from a common source, using Junko Miura's documentation generator. In the process, the generator is deleted, but you can download it from the RDS site. When a type_check failure occurs you'll be warned if the type erroneously returned a sequence for it's "true/false" result. Previously, a sequence result was simply reported as a type_check failure. Suggested by Ralf Nieuwenhuijsen. The code for demo\win32\winwire.exw was cleaned up considerably. The install program will warn you to change your autoexec.bat file when you install a new release of Euphoria onto a different drive. Version 2.1 alpha-test release January 15, 1999: We've made a number of changes to the packaging, pricing, and registration incentives for the Euphoria product: The Dual-Platform (DOS32+WIN32) package, formerly $53 has been reduced to $39 U.S., effective immediately. The Single-Platform (DOS32-only) package, formerly $32, has been discontinued. The printed manual has been discontinued. Instead, there is now an official HTML version of the manual, included with the Public Domain .zip file. All useful 3rd-party include files, such as Win32Lib.ew and many others, will be "stamped" by RDS with a code number that makes them free, just like the files in euphoria\include. They will not add to your statement count, provided you do not significantly modify them. This will also allow 3rd-party developers to get better diagnostic information from their users. Binding, shrouding and profiling will now be part of the Complete Edition only. These are features that beginners do not require, but serious users might find valuable. Short-form assignment operators += -= *= /= &= have been added. For example, instead of saying:
                 count = count + 1
  You can now say:
                 count += 1
  Instead of saying:
                 matrix[row][column] = matrix[row][column] * 5.0
  You can say:
                 matrix[row][column] *= 5.0
  Instead of saying:
                 test_scores[start..finish] = test_scores[start..finish] / 100
  You can say:
                 test_scores[start..finish] /= 100
- See refman.doc for the details. Euphoria now uses "short-circuit" evaluation of and and or expressions in if/elsif/while conditions. e.g. in an and condition:
                 if A and B then ...
  the interpreter will skip the evaluation of expression B whenever expression A is 0 (false), since it knows that the overall result must be false. In an or condition:
                 while A or B do ...
  the interpreter will skip the evaluation of expression B whenever expression A is non-zero (true), since it knows that the overall result must be true. Euphoria code written prior to version 2.1 may no longer work correctly if expression B contains a function with side-effects such as setting a global variable, doing I/O etc. In practice this kind of code is very rare, but just in case, a warning will now be issued if a function with side-effects might be short-circuited. By skipping the evaluation of B, short-circuit evaluation is typically faster, and will allow you to write statements such as:
                 if atom(x) or length(x)=1 then ...
- that would generate an error on older versions of Euphoria whenever x was an atom, since length() is not defined for atoms. See refman.doc for the details. Several new routines were added. Built-in to ex.exe/exw.exe:
  | profile() | - | turns profiling on/off so you can focus your profile and profile_time runs on particular events within your program.
  | system_exec() | - | gives you the exit code from calling a .exe or .com file, or another Euphoria program.
  | equal() | - | compares any 2 Euphoria objects for equality. equivalent to: compare(a,b) = 0 but more readable.
  Added to various include files:
  | walk_dir() | - | recursively goes through a directory and subdirectories, calling a routine that you supply.
  | reverse() | - | returns a sequence in reverse order.
  | sprint() | - | returns the string representation of any Euphoria object.
  | arcsin() | - | inverse trig function.
  | arccos() | - | inverse trig function.
  | get_bytes() | - | returns the next n bytes from a file.
  | prompt_number() | - | prompts the user to enter a number.
  | prompt_string() | - | prompts the user to enter a string.
  | instance() | - | WIN32: returns the instance handle of the program.
  | PI | - | the constant PI - 3.14159... was added to misc.e.
- See library.doc for the details. The main Euphoria documentation can now be viewed locally with a Web browser. The plain-text files refman.doc and library.doc are still available in the doc subdirectory, but we now have refman.htm and library.htm in the new html subdirectory. We have developed a tool (written in Euphoria) that lets us easily maintain both an up-to-date HTML version, and an up-to-date plain-text version of refman and library. The documentation has also been clarified and expanded in many places. WIN32: you can create an unlimited number of Euphoria call-back routines, as long as each routine is a function with 0 to 8 parameters. See platform.doc. In version 2.0 you could only have one call-back routine and it had to have exactly 4 parameters. The xor keyword has been added to complement: and/or/not and xor_bits() e.g.
                 if a xor b then...
- xor works on sequences too. It's similar to or. The dir(path) library routine now officially supports the use of wildcards * and ? in the path that you supply. This feature was always available, but wasn't documented until now. e.g.
                 info = dir("mydata\\*.d?t")
- optimization: Subroutine call+return overhead was reduced by an average of 30%. The speed-up occurs for all normal function/procedure/type calls, user-defined type-checks, call_proc()/call_func() calls using a routine id, and Windows call-backs. Only recursive calls cost the same as before. Programs with a reasonably-high frequency of calls can easily be 10% faster overall because of this. optimization: Branch straightening has been implemented. The compiler will optimize branches in the internal code such that a branch from A->B where location B contains a branch to location C, will be optimized to a direct branch from A->C. Even something like A->B->C->D can be straightened to A->D. This often occurs in while-loops that contain if-statements. optimization: In many cases, variable initialization checks are now replaced by "no-ops" after the first check is performed. Euphoria was already optimizing out many checks at compile-time. optimization: get() and value() are now much faster in most cases thanks to Jiri Babor and some further optimizations by RDS. The new v2.1 ex.exe with the new v2.1 get.e is: 1.45x faster reading a sequence of f.p. numbers from a file and 2.25x faster when reading a sequence of integers from a file. optimization: power(x,2) is converted internally to x*x which is faster in all cases, especially when x is a large integer or a f.p. number. optimization: Thanks to Jiri Babor, int_to_bits() is at least 15% faster in most cases. optimization: Plotting a long sequence of pixels in 16-color graphics modes is about 3% faster. optimization: draw_line() has been sped up by a few percent. Language War has had a major face-lift. It now runs in pixel-graphics mode 18 (640 x 480 x 16 colors) instead of text mode. It also has fine-grain parallelism, i.e. virtually anything can happen in parallel with anything else. Multiple torpedos, phasors etc can be drawn on the screen simultaneously, while ships are moving, commands are being entered, things are exploding etc. Even the timing needed for the PC speaker sound effects is handled by the task scheduler. There are no time-delay "busy" loops executed during the game. The galaxy scan now shows you a scaled picture of the whole galaxy, rather than just a bunch of numbers. The default print format for atoms was changed from "%g" to "%.10g". This format is used by print(), ?, the trace facility, and ex.err dumps. This allows large integers -9,999,999,999 to +9,999,999,999 to be printed as integers, rather than as scientific notation. It also provides about 10 digits of accuracy to be displayed on fractional numbers, rather than just 6. Art Adamson and others made it clear that more digits should be displayed. The state of all with/without settings is saved upon entering an included file, and restored at the end of the included file. An included file can change the settings, but they will be restored at the end of the included file. e.g. warnings might be turned off just within the included file (and any files it includes). As a result some programs now display warnings where none were seen before. Warnings are now displayed after your program finishes execution, so they won't be erased by clear_screen(), graphics_mode() etc. Some programs now show warnings where none were seen before. The security of scrambled code and bound code has been improved thanks to ideas contributed by Rusty Davis. When a bound program starts executing, a quick integrity check will be made to detect any corruption or tampering. It's still ok to add data to the end of a bound .exe file, as long as your last line is abort(x). The ed editor now lets you view and edit beyond column 80. ed has a new command: Esc m (modifications). It will show the differences between the original file on disk and the current edit buffer. This can be very useful when you've forgotten what changes you've made, and you are wondering if it's safe to save them. The trace window now provides an upper case Q command which lets the program run to completion, ignoring any trace(1) commands. Lower case q lets it run to the next trace(1). safe.e (debug version of machine.e) has been enhanced. It will now automatically catch additional cases where data is illegally written just before, or just after, the boundaries of an allocated block of memory. This can be particularly useful in WIN32 where Windows might overwrite one of your under-sized blocks. Without a tool such as safe.e, this type of bug could take hours or even days to track down. The euphoria\tutorial directory was created to hold several small tutorial programs. The limit on the number of open files was raised to 25 from 15. Three of these files are 0,1,2: standard-input, standard-output and standard-error, so you can now have up to 22 of your own files open simultaneously. (As far as we know, no one ever exceeded the old limit, but it seemed wise to raise it.) When the user simply types ex or exw and is prompted for the name of the Euphoria .ex or .exw file to run, command_line() will now be updated to include the filename as the second command-line argument, just as if the user had originally typed: ex filename. Thanks to Mathew Hounsell for suggesting this. mset.ex now saves pictures in .bmp format. Previously it was using a non-standard, compressed format. lines.ex (lines.bat) now reports non-blank/non-comment lines as well. This is not the same as the "statement count" used by Euphoria for the diagnostic limit, but it's usually within +/- 10%, assuming you write one statement per line. Numeric literals greater than 1e308 (roughly) are now set to +/- inf. They used to cause a compile-time error. Version 2.0 Official Release March 25, 1998: The install procedure has changed. The Euphoria .zip file now contains a large bundle.dat file that contains over 100 files. This makes it easier for people to locate the important files: readme.doc, install.bat, etc. that they should look at before installing. The .zip file is also 35K smaller as a result. shroud will warn you to use bind/bindw if you try to create a shrouded source file with a name ending in ".exe". Version 2.0 (beta) February 26, 1998: The WIN32 interpreter, exw.exe, is now a true WIN32 GUI program. In 2.0 alpha it was a WIN32 console program that was always associated with a console or DOS-window. A DOS-style console window will now be created only if your program needs one. exw will automatically create a new console window the first time your program writes to the screen, reads from the keyboard, or calls any library routine that requires a console to work. The console will disappear automatically when your program finishes execution. A new library routine, free_console(), will immediately delete the console window if you currently have one. The Complete Edition of Euphoria now provides a -scramble option of bind and shroud to improve the security of programs that you distribute. You can now pass Euphoria atoms to C routines as 64-bit C double type floating-point arguments, and you can receive a floating-point result back from a C function. exw.exe (beta) runs 10 to 15% faster than exw.exe (alpha) (based on sieve.ex, shell.ex, etc.). The WATCOM C compiler was doing a bad job of optimizing a critical section of the interpreter when building exw.exe, but was producing excellent code when building ex.exe. With some trivial changes to the interpreter C code, WATCOM now produces excellent code for both platforms. The average program now has 60K more memory available before having to use the swap file. The limit on the size of a single procedure, function or type has been eliminated. The limit on the size of a single top-level statement has been eliminated. The limit on the total number of include files that can make up a program has been increased to 256 from 150. Some optimizations were added. The following general forms of expression are now faster:
                 2 * x
                 x * 2
                 1 + x
- where x can be any expression, and have type atom or sequence. There is a new documentation file, perform.doc with lots of tips for performance-obsessed programmers. If you call a C routine using c_func(), but you linked the C routine using define_c_proc() you will get an error message. Similarly, if you call it using c_proc(), but you linked it using define_c_func() you'll get an error message. This restriction was documented, but not actually enforced in 2.0 alpha. Some programs written for the alpha release will have to be corrected. You will now see the actual name of the C or Euphoria routine that you were attempting to call, when you get an error message from call_proc(), call_func(), c_proc(), or c_func(). A new -clear_routines option of bind and shroud will leave the names of all routines unshrouded. This is necessary if your program calls routine_id(). You'll be warned if you use routine_id() and do not choose this option. (Registered users can use -scramble together with -clear_routines to restore a high level of shrouding.) If a name conflict arises with a global symbol, the shrouder will now warn you, and then choose a new name. It used to abort with a message. It is no longer possible to trace or profile shrouded code. A new demo program, hash.ex, was added to euphoria\demo. freq.ex was moved from euphoria\bin to euphoria\demo and renamed as tree.ex. A new documentation file, bind.doc describes all the features of bind.bat and shroud.bat. The previous description in refman.doc has been shrunk. The file overview.doc gives a quick overview of all documentation files. The description of get_mouse() in library.doc discusses the problem of 320-wide graphics modes (you must divide the x coordinate value by 2). Version 2.0 (alpha) November 5, 1997: A new platform is now supported. exw.exe will run Euphoria programs using the WIN32 (Windows 32-bit) operating system. ex.exe will run programs using DOS32 (extended DOS). See platform.doc for further details. The following library routines have been introduced. For both DOS32 and WIN32:
  | platform() | - | find out which platform you are executing on. (The PLATFORM constant is available in Euphoria 2.2 and later).
  | routine_id() | - | get a small integer id number for a Euphoria procedure or function.
  | call_proc() | - | call a Euphoria procedure by using its id.
  | call_func() | - | call a Euphoria function by using its id.
  | custom_sort() | - | sort a sequence using a compare function that you specify.
  | poke4() | - | store a number into 4 bytes of memory. poke4(address, value) is at least 10x faster than: poke(address, int_to_bytes(value)). poke4() also works with sequences of values.
  | peek4s() | - | read 4 bytes of memory as a signed integer (works on sequences too).
  | peek4u() | - | read 4 bytes of memory as an unsigned integer (works on sequences too). peek4u(address) is 10x faster than: bytes_to_int(peek({address, 4})).
  | allocate_string() | - | allocate and store a 0-terminated string in memory.
  For WIN32 only:
  | open_dll() | - | open a Windows .dll file.
  | define_c_proc() | - | define a C routine that will be called from Euphoria (no value returned).
  | define_c_func() | - | define a C routine that will be called from Euphoria (a value will be returned).
  | call_c_proc() | - | call a C routine from Euphoria (no value is returned).
  | call_c_func() | - | call a C routine from Euphoria (a value is returned).
  | call_back() | - | get a call-back address, so Windows can call your Euphoria routine when the user interacts with your window.
  | message_box() | - | display a simple Yes/No/Cancel window.
- New Demo programs: csort.ex email.exw window.exw winwire.exw dsearch.exw New include files:
  | safe.e | - | debug version of machine.e
  | misc.e | - | miscellaneous
  | dll.e | - | dll access
  | msgbox.e | - | Windows message box
The following additional improvements have been made to the DOS32 version: On Pentium and higher systems, floating-point calculations are now about 20% faster (and floating-point in exw is a further 20% faster than ex for 2.0). printf() to the screen, and print() to the screen are both significantly faster in most cases. The trace screen is updated a bit faster. The time profile is more accurate regarding getc(). The mset.ex demo runs 30% faster. Highlights of Older Releases: Version 1.5a June 13, 1997: Many operations and library routines were optimized. get_key() is 100x faster when there is no key in the buffer. get_all_palette() is over 100x faster and this makes save_screen() much faster. The following routines have now been built directly into ex.exe, to avoid the overhead of calling machine_proc() or machine_func(): pixel(), get_pixel(), mem_set(), mem_copy(). poke() of a long sequence into memory, other than video memory, is 50% faster. pixel() is 4x faster in mode 19. get_pixel() is faster in all modes. display_image() is about 30% faster in most modes and up to 4x faster in mode 19, because pixel() is faster. All arithmetic and bitwise operations applied to sequences of integers are now 29% faster. a & b (concatenation) is 15% faster in most cases, and is dramatically faster in the case where you grow a very long sequence by concatenating many small sequences onto it. getc() is 12% faster. match() is 8% faster in typical cases. append()/prepend() are 15% faster in many cases. find() of an integer within a sequence of integers is 64% faster. Formation of a 2-element sequence {a,b} is 11% faster. Internal copying of a shared sequence when it can no longer be shared is 15% faster. Version 1.5 March 21, 1997: The following library routines were added. They are described fully in library.doc. allow_break() check_break() mem_copy() mem_set() atom_to_float32() atom_to_float64() float32_to_atom() float64_to_atom() get_all_palette() save_bitmap() save_screen() arctan() and_bits() or_bits() xor_bits() not_bits() get_vector() set_vector() lock_memory() tick_rate() with profile_time (time profiling for DOS32) was added. Version 1.4b, October 1996: mset.ex has a more visible selector box on it's grid. It has also been sped up. ed.ex now allows special characters greater than ASCII 127 to be entered by pressing the Alt key and typing digits on the numeric keypad. Version 1.4a, July 1996: crash_message() library routine was added. Programs bound by registered users will now produce run-time error diagnostics regardless of the size of the program. shroud.bat has a new option -full_keywords. Version 1.4, May 1996: You can now convert any Euphoria program into a stand-alone .exe file. The separate DOS4GW.EXE DOS extender file has been eliminated. Windows 95 long filename support. Support for DOS software interrupts. New utility programs: key.ex, where.ex, ascii.ex, guru.ex. New demo program: dosint.ex. New library routines: set_rand(), use_vesa(). You can peek or poke an entire sequence of bytes. Editor enhancements. Reduction in space overhead for sequences. Version 1.3, June 1995: You can now edit multiple files using multiple edit windows. 20 new library routines were added. Graphics performance was greatly improved. Version 1.2, March 1994: A problem that prevented Euphoria from running in a DOS prompt under Windows was eliminated. Version 1.1, January 1994: Several language features and demo programs were added. Version 1.0, July 1993: Euphoria was first released after 3 years of research and development and 6 months of Beta testing. Many of the ideas behind Euphoria came from Robert Craig's Master's Thesis in Computer Science at the University of Toronto. That thesis was strongly influenced by the work of John Backus on functional programming (FP) languages.