I created new snapshots of the jed 0.99 development code and
slang 1.3.x development code. They are available from
ftp://space.mit.edu/pub/davis/jed/snapshots/. Both jed and slang have
undergone many changes since the last officially released versions.
In particular, jed has much improved syntax highlighting and slang
has support for dynamically loaded modules, namespaces, and
I hope to officially release jed 0.99 and slang 1.4 sometime before
the new year. However, I am unable to test the code on non-Unix
platforms and I would appreciate any feedback regarding their
compilation and execution on other operating systems.
Below, you will find a list of the slang changes since 1.2.x and
the jed changes since 0.98-7:
************ SLang Changes ***********************
Changes since 1.2.2
0. New assignment operators: *= /= &= |=
The addition of these operators meant that some of the internal
byte-codes had to be modified. This change should only cause
problems with byte-compiled or preprocessed .sl files. As far as I
know, only the JED editors uses this feature. So, after upgrading
the library, and before running JED, do the equivalent of
That is, delete the byte-compiled .slc files.
1. Now the language supports `!if ... else' statements.
2. New intrinsics:
__is_initialized: This may be used to see whether or
not a variable is initialized, e.g, __is_initialized (&variable);
__get_reference: Returns a reference to an object with a
rmdir, rename, remove (slfile.c): these return 0 upon success, -1 upon
failure and set errno
getpid, getgid, getppid (slunix.c)
_typeof: This is similar to `typeof' except in the case of
arrays where it returns the data type of the array
__pop_args, __push_args: see documentation
fseek, ftell, and symbolic constants SEEK_END, SEEK_CUR, SEEK_SET
3. `Conj' function added to get the complex conjugate
4. New array module that implementes additional array functions, e.g.,
transpose, matrix multiplication, etc... Use `SLang_init_array' to
5. An array such as [[1,2,3],[4,5,6]] is interpreted as a 2-row
6. Amiga patches from Jrg Strohmayer <j...@gmx.de>.
7. New table types:
These are useful for defining symbolic constants. See slmath.c and
slfile.c for examples of their use.
8. A new pseudo-function: __tmp
This `function' takes a single argument, a variable, and returns
the value of the variable, and then undefines the variable. For
variable x = 3;
y = __tmp(x);
will result in `y' having a value of `3' and `x' will be undefined.
The purpose of this pseudo-function is to free any memory
associated with a variable if that variable is going to be
re-assigned. For example, consider:
variable x = [1:10:0.1];
x = 3*x^2 + 2;
At the time of the re-assignment of `x' in the last statement, two
arrays will exist. However,
x = 3*__tmp(x)^2 + 2;
results in only one array at the time of the assignment, because
the original array associated with `x' will have been deleted. This
function is a pseudo-function because a syntax error results if
9. New low-level push/pop functions that are designed specifically
for use in constructing the push/pop methods of application
defined data types. These functions have names of the form:
where * represents int, long, char, short, ptr, double, float.
See sltypes.c to see how they are used by, e.g., SLANG_INT_TYPE.
10. New module import facility. See modules subdirectory for
examples. To enable this, use
in you application. Modules will be searched in the following order
1. Along the path specified by the `set_import_module_path'
function, or by the C functiion SLang_set_module_load_path.
2. Along the path given by the SLANG_MODULE_PATH environment
3. Along a system dependent path, e.g., LD_LIBRARY_PATH
4. In the current directory.
New interpreter intrinsics include:
import (String_Type MODULE_NAME);
set_import_module_path (String_Type PATH);
String_Type get_import_module_path ();
11. New integer and floating point types added to the language. Now
all basic C signed and unsigned integer types are supported:
C bindings S-Lang bindings
For example, `Long_Type' creates an array of 10 longs.
12. New intrinsic: set_struct_field. See function reference for more
----- snapshot slang1.3_981030 made available -----
13. Type synonyms added:
Int16_Type, UInt16_Type (16 bit (un)signed integer)
Int32_Type, UInt32_Type (32 bit (un)signed integer)
Int64_Type, UInt64_Type (64 bit (un)signed integer)
Float32_Type (32 bit float)
Float64_Type (64 bit float)
Not all systems support 64 bit integers. These synonyms are
useful when one needs integers and floats of a definite size.
14. array_sort changed to use qsort. The main reason for this is that
the previous sorting method was derived from a numerical recipes
15. New namespace manipulation functions available. When a function
or variable is declared as `static', it is placed in the private
namespace associated with the object being parsed (a file). By
default, there is no way of getting at that function or variable
from outside the the file. However, the private namespace may be
given a name via the `implements' function:
Then the private variables and functions of the namespace A may be
accessed via A->variable_name or A->function_name. The default
global namespace is called `Global'. For example, the intrinsic
function `message' is defined in the global namespace. One may
use either of the following forms to access it:
----- snapshot slang1.3_981104 made available -----
16. New intrinsics:
strtok (See documentation)
length (Get the length of an object)
17. New data type added: Any_Type. An array of such a type is capable
of holding any object, e.g.,
a = Any_Type ;
a = 1; a = "string"; a = (1 + 2i);
Dereferencing an Any_Type object returns the actual object. That
is, @a produces "string".
18. Associative arrays added. See documentation.
19. New `foreach' statement. See the section on `foreach' in
doc/text/slang.txt as well as the examples in examples/assoc.sl
20. Oops. sign function was broken.
21. array_sort modified to also accept &function_name.
*************** JED changes *************************
Changes since 0.98-7
0. Major changes to the display system. Now jed uses the SLang
screen management routines. Syntax highlight of multi-line
comments should now work correctly.
1. insert_char did not check read-only status of buffer.
2. Added patches from Joao Luis Fonseca <joa...@centroin.com.br>
3. Typo in idl.sl corrected.
4. New rmail functions:
5. %p status line specifier now includes the column if LINENUMBERS
is greater than 1.
6. Tweaks to src/gpmmouse.c from George R. Young
7. Port to MINGW32 from Marko Pistotnik <mpistot...@hotmail.com>.
Note: mswshell.exe is still a BCC compiled 16 bit executable.
It appears that mswshell.c still needs ported to WIN32.
9. VMSMAKE.COM changes provided by Martin P.J. Zinser
<m.zin...@gsi.de>. He also provided jed/doc/JED.HLP for VMS.
10. OS/2 ICC patches from Eddie Penninkhof <eddie.pennink...@tip.nl>.
11. Small regexp bug in backward searches fixed
12. check_buffers intrinsic function added.
13. Bug fix in keymap.c fixed (Tom Culliton <culli...@clark.net>)
14. jed/lib/syntax.sl: bug fixed (Michael Johnson<redbe...@redbeard.com>).
15. compile.sl typo fixed
16. Major changes to win32/win16 code from Luchesar Ionkov
17. Patch to x_region_to_cutbuffer from Mark Olesen
18. OS/2 and isearch specific patches from k-yos...@inatori.netsweb.ne.jp.
19. Xjed color allocation changes from Radim Halir
20. CHanges to better support C++ from Michael Johnson
<redbe...@redbeard.com> as well as changes to html.sl.
21. Fortran-sytle comments are now mode dependent in a much more
useful and flexible way via the new intrinsic
22. TI asm mode added (tiasm.sl).
23. modeinfo.sl added. The functions in this file facilitate
sharing information between modes:
For example, a mode can define folding information that
folding.sl can use. See, e.g., folding.sl and cmode.sl.
(B0.99.1 snapshot released)
24. Bug fixes:
* Blink match bug fixed involving " at the beginning of a line.
* In sh-mode `\'' given a string syntax.
25. hook_add_to_hook replaced by hooks.sl:hook_add_hook. I believe
this interface permits better chaining of hooks.
26. isearch.sl bug fix involving ^G abortion of search.
27. Updates to dabbrev.sl to use array syntax. Also foreach...using
used in some .sl files. See slang documentation for
information about foreach construct.
28. Some functions and variables in several lib/*.sl files have
been made `static'.
John E. Davis Center for Space Research/AXAF Science Center
617-258-8119 One Hampshire St., Building NE80-6019
http://space.mit.edu/~davis Cambridge, MA 02139-4307