changes since 0.99.6 1. ALL macros beginning with LANG have been changed to use SLANG as the prefix. For example, the macro LANG_IVARIABLE has been renamed to SLANG_IVARIABLE. If you have used one of these macros, please make the change. 2. Application defined types. See demo/complex.c for an example that defines complex numbers and overloads the binary and unary operators to work with them. changes since 0.99.5 1. New interface for application defined objects. Functions include: extern SLuser_Object_Type *SLang_pop_user_object (unsigned char); extern void SLang_free_user_object (SLuser_Object_Type *); extern void SLang_push_user_object (SLuser_Object_Type *); extern SLuser_Object_Type *SLang_create_user_object (unsigned char type); This means that S-Lang scripts do not have to worry about freeing structures, arrays, etc... A consequence of this fact is that the intrinsic function `free_array' has been removed. See examples of this exciting new feature in slang/demo. 2. Better documentation and examples. See slang/doc/*.* as well as examples in slang/demo. 3. Memory allocation macros have changed from MALLOC to SLMALLOC, etc... Applications are encouraged to use these rather than `malloc' because by compiling your application AND the slang library with the -DMALLOC_DEBUG will link in code that checks if you have corrupted memory, freed something twice, etc... Use the function `SLmalloc_dump_statistics' for a report of memory consumption by your program. changes since 0.99.4 1. cleaned up the source some and I changed the names of the hooks user_whatever to `SLang_User_Whatever'. This makes them more consistent with other external functions and variables and helps avoid name space pollution. changes since 0.99.3 * added screen management stuff * added a new help file reader (see help directory) * DOUBLE precision is now the default. I think that this makes more sense for an interpreted langauge. * searching routines added. changes since 0.99.2 * added low level tty support for VMS, DOS, and Unix * slang readline added * keymap support * files restructured so that programs can link, say, the readline library and not get the whole interpreter linked in. changes since 0.99.1 * obscure bug in regular expression fixed * optimizing performed for 10% speed increase in speed for some language constructs changes since 0.99.0 * semantics of the `switch' statement changed to be more C-like with the addition of the `case' keyword. For example, one can write: switch (ch) { case 'A': something (); } { case 'B': something_else (); } { case 3.14: print ("Almost PI"); } { case "hello": print ("hi"); } Note that one may mix data types without the possibility of a type mismatch error. changes since 0.98: * matrix package added. Currently only matrix multiplication and addition is supported. More functions will be added (determinants, inverse, etc..) This support is provided by the `init_SLmatrix ()' call. This support provides the following S-Lang intrinsics: matrix_multiply, matrix_add * New S-Lang core intrinsic: copy_array : copys the contents of one array to another changes since 0.97: * Double precision floating point supported. Use the -DFLOAT_TYPE -DUSE_DOUBLE compiler flags to enable this. Note that S-Lang does not support single precision and double precision floating point number SIMULTANEOUSLY. You must choose one or the other and stick with it! * Byte compiling is now more than simple preprocessing. This results in about a 20% decrease in loading time. This also means that if you rebuild your application, you MUST re-bytecompile. * New syntax added: Consider a function f that returns multiple values. Then to assign these values to, say var_1, and var_2, simply write: (var_1, var_2) = f (); This is an alternative to: f (); =var_2; =var_1; Changes since 0.96: It is now possible to use short circuit boolean evaluation of logical expressions is the `orelse' and `andelse' constructs. Previously, these constructs were only available at the infix level. The new syntax looks like (example taken from JED's rmail.sl): if (orelse {re_bsearch("^\\CFrom:.*<\\(.+\\)>");} {re_bsearch("^\\CReply-To: *\\([^ ]+\\) *");} {re_bsearch("^\\CFrom:.*<\\(.+\\)>");} {re_bsearch("^\\CFrom: *\\([^ ]+\\) *");} {re_bsearch("^\\cFrom +\\([^ ]+\\) *");} ) { from = rmail_complex_get_from(from); } Modified some of the array code to use handles to arrays instead of actual arrays. This adds alot more protection for the use of arrays. The downside is that there is a limit on the number of active arrays. This limit has been set to a default value ot 256. An ``active'' array is an array that has been created but not freed. Fixed a parse error that occurred when an `if' statement imediately follow the `:' in a switch statement. putenv intrinsic added. EXIT_BLOCK: if an exit block is declared, it is called just before the function returns to its caller. It is now possible to perform assignments in variable declaration statements, e.g., variable i = 0, imax = 10, n = strlen (name); Condition compilation of S-Lang source possible. See .sl files in the jed distribution. A bug which prevent assignment to a global C floating point variable was fixed. Changes to `calc': `apropos' function added to calc.sl. For example, `apropos("str")' creates a list of all intrinsic functions that contain the substring "str" (strcmp, strcat, etc...) Command line arguments are now loaded as S-Lang source files. This makes it possible to create a Unix executable such as: #! /usr/local/bin/calc define hello_world () { print ("hello world"); } loop (10) hello_world (); quit ();