cfad47cfa3/t3compiler/tads3/doc/t3changes.htm

4b825dc642cb6eb9a060e54bf8d69288fbee4904cfad47cfa334b206c65f22086bcc5d63e6f70944
1
<html>
2
<title>TADS 3 Change History</title>
3
4
<h1>TADS 3 Change History</h1>
5
6
<p>For information on changes to the library (adv3), refer to the
7
<a href="../lib/adv3/changes.htm">Recent Library Changes</a> list.
8
9
<!------------------------------------------------------------------------>
10
<h3>Changes for 3.0.18.1 (May 5, 2009)</h3>
11
12
<ul>
13
14
<li>The behavior of the multi-method inherited() operator has changed.
15
The operator now chooses the inherited function to call based on the
16
actual argument values, rather than the formal (declared) parameters
17
to the current function.  This is more consistent with the inherited()
18
operator for regular methods.
19
20
<li>A bug in the compiler, versions 3.0.17, 3.0.17.1, and 3.0.18,
21
caused incorrect (too small) stack size requests to be generated for
22
some functions and methods.  This generally had no noticeable effect
23
on valid programs, but it made it possible for an errant program (with
24
infinite recursion, for example) to cause a stack overflow that the
25
interpreter doesn't detect immediately, which could conceivably crash
26
the interpreter.  An actual crash would require an unlikely
27
combination of factors, even with an errant program compiled with this
28
bug, so you'll probably never notice it.  Even so, if you distributed
29
any .t3 files compiled with t3make versions 3.0.17 through 3.0.18, we
30
recommend recompiling with the current t3make version and replacing
31
your previously distributed files, if it's easy for you to do so.
32
33
</ul>
34
35
36
<!------------------------------------------------------------------------>
37
<h3>Changes for 3.0.18 (April 28, 2009)</h3>
38
39
<ul>
40
41
<li>The <tt>inherited</tt> operator can now be used within a multi-method
42
to inherit an overridden version of the method.  The new syntax
43
<tt>inherited&lt;<i>type-list</i>&gt;(<i>arg-list</i>)</tt> lets you
44
inherit a specific version of the multi-method, while the basic syntax
45
<tt>inherited(<i>arg-list</i>)</tt> automatically selects the next
46
more general version of the multi-method.  See the System Manual
47
section on multi-methods for documentation.
48
49
<li>The compiler pre-defines the new preprocessor symbol (i.e., macro)
50
__TADS3, which expands simply to the number 1.  This provides an easy
51
way to detect that the compiler is a TADS 3 compiler (as opposed to a
52
TADS 2 compiler) for conditional compilation purposes.  (This might
53
seem redundant with the existing symbol __TADS_SYSTEM_MAJOR, but
54
__TADS3 can be used in one way that __TADS_SYSTEM_MAJOR can't.  If for
55
some reason you wanted to create a single source file that could be
56
compiled under TADS 2 or TADS 3, using conditional compilation to
57
handle the syntax differences between the language versions, you
58
couldn't do it with __TADS_SYSTEM_MAJOR.  This is because TADS 2
59
doesn't support #if, which is the only way you could use
60
__TADS_SYSTEM_MAJOR to conditionally compile based on compiler version
61
(e.g., <tt>#if __TADS_SYSTEM_MAJOR == 3</tt>).  Since TADS 2 and 3
62
both support #ifdef, though, you can use the presence or absence of
63
the __TADS3 symbol to conditionally include or omit code based on
64
language version.  Of course, since older versions of the TADS 3
65
compiler also lack this symbol, this approach requires using 3.0.17.2
66
or later on the TADS 3 side.)
67
68
<li>In past versions, writing to text files with a UTF-16 encoding
69
generated incorrect newline sequences when running on Windows.  The
70
problem had to do with the two-character representation of a newline
71
in Windows.  This has been corrected.
72
73
<li>In the past, multi-methods defined in one source file and called
74
from another resulted in an "undefined symbol" error.  This has been
75
corrected.
76
77
</ul>
78
79
80
<!------------------------------------------------------------------------>
81
<h3>Changes for 3.0.17.1 (8/12/2008)</h3>
82
83
<ul>
84
85
<li><p>A compiler bug introduced in 3.0.17 caused Workbench (and the
86
stand-alone interpreter) to crash when loading certain games when
87
compiled for debugging.  The compiler was mis-calculating some
88
internal data structure sizes, which effectively corrupted the .t3
89
file; this happened when the byte code for a function plus its debug
90
symbols was over a certain threshold size.  This has been corrected.
91
92
</ul>
93
94
<!------------------------------------------------------------------------>
95
<h3>Changes for 3.0.17 (8/9/2008)</h3>
96
97
<ul>
98
99
<li><p>The compiler has a new feature called "multi-methods."  This
100
implements a relatively new object-oriented programming technique
101
known as multiple dispatch, in which the types of <i>multiple</i>
102
arguments can be used to determine which of several possible functions
103
to call.  The traditional TADS method call uses a
104
<i>single-dispatch</i> system: when you write "x.foo(3)", you're
105
invoking the method foo as defined on the object x, or as inherited
106
from the nearest superclass of x that defines that method.  This is
107
known as single dispatch because a single value (x) controls the
108
selection of which definition of foo will be invoked.  With multiple
109
dispatch, this notion is extended so that multiple values can be
110
considered when selecting which method to invoke.  For example, you
111
could write one version of a function "putIn()" that operates on a
112
Thing and a Container, and another version of the same function that
113
operates on a Liquid and a Vessel, and the system will automatically
114
choose the correct version at run-time based on the types of
115
<i>both</i> arguments.  This new system is described more fully
116
in the <i>System Manual</i>.
117
</p>
118
119
<li><p>The compiler can now generate information in each object about the
120
source file where the object was defined.  This new information is
121
stored in a new property, sourceTextGroup; this supplements the
122
existing sourceTextOrder property.  Since the new information takes up
123
extra space in the compiled file, it's not generated by default.  To
124
generate it, include the new compiler option "-Gstg" in your makefile
125
or command line, <i>or</i> place the directive <tt>#pragma
126
sourceTextGroup(on)</tt> directive in each source module where you
127
wish to generate the information.  The #pragma lets you selectively
128
generate the information in specific source files, or even in specific
129
portions of specific source files: the corresponding directive
130
<tt>#pragma sourceTextGroup(off)</tt> lets you turn off the
131
information in a section where you don't need it.</p>
132
133
<p>When you turn on sourceTextGroup generation, the compiler
134
automatically adds a sourceTextGroup property to each object, just as
135
it automatically adds a sourceTextOrder value.  The sourceTextGroup
136
value is a reference to an anonymous object that the compiler
137
automatically creates.  One such object is generated per source module
138
for which sourceTextGroup generation is activated.  This object
139
contains two properties: sourceTextGroupName is a string giving the
140
name of the module, as it appeared in the compiler command line,
141
makefile (.t3m), or library (.tl) file; sourceTextGroupOrder is an
142
integer giving the relative order of the module among the list of
143
modules comprising the overall program.
144
</p>
145
146
<p>sourceTextGroup is useful in cases where you want to establish the
147
order of appearance in source files among objects in multiple modules.
148
For a given object <tt>x</tt>,
149
<tt>x.sourceTextGroup.sourceTextGroupOrder</tt> gives you the relative
150
order within the overall build of the module where <tt>x</tt> was
151
defined, and <tt>x.sourceTextOrder</tt> gives you the relative order
152
of <tt>x</tt> among the objects defined within that module.  Between
153
the two values, you can establish a linear ordering for all of the
154
statically defined objects in the entire program.</p>
155
156
<li><p>The compiler now stores "links" to resource files in the .t3 file
157
when compiling in Debug mode.  This makes it easier to test a game
158
that uses multimedia resources, by making the Build environment match
159
the Release environment more precisely.</p>
160
161
<p>In the past, when building in Debug
162
mode, the compiler completely ignored multimedia resource files listed
163
in the "-res" section of the command line or makefile.  This was by
164
design; the reasoning was that when you're compiling in Debug mode,
165
you'll only be running that copy on your development machine, within
166
your build environment, where all of the resource files are available
167
as local files; and since the files are all available as separate
168
local files anyway, we can make the compilation go faster by skipping
169
the step where we copy those files into the .t3 file.</p>
170
171
<p>This worked
172
fine <i>most</i> of the time, but it didn't work in the occasional
173
case where the resource name is different from the corresponding local
174
file's name in the file system.  One example is the Cover Art file,
175
which is always stored in the game under the resource name
176
".system/CoverArt.jpg", which is usually <i>not</i> the same name the
177
file has locally.  This meant that if you tried to refer to such a
178
resource via HTML (such as with an &lt;IMG&gt; tag), the resource was
179
reported as missing when running the debug build.</p>
180
181
<p>The new arrangement
182
fixes this problem without giving up the time savings.  With the new
183
scheme, the compiler stores a <b>link</b> for each resource in the .t3
184
file: this simply records the mapping from resource name to local
185
file name.  The HTML renderer can then look up the appropriate local
186
file for each resource, including any resources that have special
187
names.  As before, the actual contents of the resources are not
188
copied.
189
</p>
190
191
<p>Note that none of this affects Release builds.  The compiler has
192
always copied the full contents of all resources into the .t3 file
193
when doing a Release build, and continues to do so.  Release builds
194
continue to be fully self-contained, so that you only have to
195
distribute the .t3 file to players, <i>not</i> the individual
196
graphics and sound files it refers to.</p>
197
198
<li><p>The compiler's status output didn't add a line break after each
199
resource files being added to the project, resulting in poorly formatted
200
displays.  This has been corrected.</p>
201
202
</ul>
203
204
205
<!------------------------------------------------------------------------>
206
<h3>Changes for 3.0.16 (4/10/2008)</h3>
207
208
<ul>
209
210
<li>The Author's Kit installer now gives you an option to skip
211
creating the Windows file type associations for Workbench
212
(specifically, project (.t3m) files).
213
214
<li>The main startup routine in the library now performs an explicit
215
garbage collection pass just before performing pre-initialization.  In
216
most cases, this is unnecessary (and harmless, obviously, apart from
217
the added execution time required to perform the GC pass).  However,
218
under a certain combination of conditions, it can be important.  In
219
particular, it's important when a program is compiled so that preinit
220
is performed at run-time rather than compile-time (this is normally
221
the case for a "debug mode" build, but can be explicitly selected for
222
a release build as well), <i>and</i> the program has
223
pre-initialization code that performs global object loops.  In such a
224
program, a RESTART would re-run preinit, which could then encounter
225
garbage objects still around from before the RESTART.  The explicit GC
226
pass just before preinit ensures that preinit sees only reachable
227
objects in any global object loops it performs.
228
229
<li>A bug in the ByteArray intrinsic class caused an interpreter crash
230
when copying exactly the full bounds of an array onto itself.  This has
231
been corrected.
232
233
<li>The rexReplace() intrinsic function got stuck in an infinite loop
234
when the pattern to be replaced matched zero characters of the subject
235
string.  For example, a match pattern of "x*" is able to match any
236
number of "x" characters in a row, <i>including</i> zero of them.  The
237
problem was that the function simply spun its wheels, repeatedly
238
finding the same zero-character match and replacing it over and over.
239
This no longer occurs: the function will apply each zero-character
240
replacement once only, and then move on to the next character of the
241
subject string before attempting a new match.
242
243
<li>The rexSearch() and rexReplace() functions didn't properly take
244
into account "^" (start-of-string) pattern specifiers when a starting
245
offset for the search was explicitly specified.  The functions
246
incorrectly considered "^" to match the start of the substring
247
starting at the given starting offset, whereas it should have only
248
matched the start of the entire string.  In other words, "^" should
249
never match when the starting offset is greater than 1.  This has been
250
corrected.
251
252
<li>A bug in the t3DebugTrace() intrinsic function sometimes caused the
253
debugger to stop execution at the second line after the t3DebugTrace()
254
function, rather than at the next line.  This happened if you used the
255
"Go" command to resume execution from the point where t3DebugTrace()
256
stopped, then encountered the same t3DebugTrace() call without any
257
intervening debugger activity.  This has been corrected.
258
259
<li>Comparing another object value to "self" in a global breakpoint
260
expression sometimes caused the debugger to crash in past versions.
261
This has been corrected.
262
263
<li>In the past, the compiler returned a "success" indication to the
264
operating system shell as long as no error messages were displayed
265
during the compilation.  This was incorrect in cases where the "treat
266
warnings as errors" option was enabled and one or more warning
267
messages were displayed; in these cases, the compiler should have
268
returned a "failure" indication to reflect the fact that warnings
269
count as full-fledged errors under this option setting.  This has
270
been corrected.
271
272
<li>Applying toInteger() to BigNumber values near the capacity limits
273
of the 32-bit integer type, but not exceeding them, sometimes produced
274
spurious "numeric overflow" errors.  In particular, values over
275
2147483640 or under -2147483640 that needed to be rounded up in their
276
fractional parts (e.g., 2147483640.9) produced this spurious error.
277
This has been corrected.
278
279
</ul>
280
281
282
<!------------------------------------------------------------------------>
283
<h3>Changes for 3.0.15.3 (11/2/2007)</h3>
284
285
<ul>
286
287
<li>A bug in the compiler made it impossible to refer to items in
288
global scope (such as enum values or objects) in constant expressions
289
within anonymous functions.  For example, it was impossible to use
290
an enum value or object name as a 'case' label in a 'switch' statement
291
within an anonymous function.  This has been corrected.
292
293
<li>A bug in the GrammarProd intrinsic class caused incorrect results
294
in some cases for an empty production (i.e., a grammar rule consisting
295
of no tokens).  The problem had to do with the way the empty
296
production figured its position in the input token list; since
297
enclosing levels in the match tree find their positions relative to
298
child nodes, the problem typically manifested itself by giving
299
incorrect token list positions for one or more match levels enclosing
300
an empty match.  This is now fixed.
301
302
</ul>
303
304
305
<!------------------------------------------------------------------------>
306
<h3>Changes for 3.0.15.2 (9/13/2007)</h3>
307
308
<ul>
309
310
<li>The inputFile() function now makes some additional checks when the
311
filename is supplied by an active event script file.  If the dialog
312
type is InFileOpen, the function checks to make sure the filename read
313
from the script refers to an existing file.  If the dialog type is
314
InFileSave, and the named file doesn't already exist, the function
315
tries to create a dummy copy of the file; if that succeeds, the
316
function immediately deletes the dummy copy.  The function also still
317
tests, as it did before, to make sure the file <i>doesn't</i> already
318
exist for InFileSave dialogs.  If any of these tests fail, the
319
function warns the user about the problem and offers the same options
320
it did in the past for the save-overwrite case: use the filename as
321
given in the script, choose a different file, or cancel the script
322
playback.
323
324
<li>A bug in the VM caused sporadic, unpredictable errors when
325
finalizers were used.  The problem affected one opcode (OPCGETPROPR0);
326
if a finalizer invocation happened to interrupt this particular
327
opcode, the result was unpredictable, but could include spurious
328
run-time errors or corruptions of calculated results.  This has been
329
corrected.
330
331
</ul>
332
333
334
335
<!------------------------------------------------------------------------>
336
<h3>Changes for 3.0.15.1 (7/19/2007)</h3>
337
338
<ul>
339
340
<li>The keyword <tt>replaced</tt> can now be used within anonymous
341
functions that are nested in modifier functions (i.e., functions
342
defined with <tt>modify <i>funcname</i> ...</tt>).  In the past, the
343
compiler only allowed <tt>replaced</tt> to be used <b>directly</b>
344
within a modifier function - not in nested anonymous functions defined
345
within a modifier function.  There's no inherent reason for
346
disallowing this construct; it was simply a limitation of the
347
compiler, which has now been lifted.
348
349
<li>In the system library, the several internal convenience macros
350
defined with the Tokenizer class (tokRuleName, tokRulePat,
351
tokRuleType, etc) have been moved from the tok.t class file to the
352
tok.h header file.  The macros are unchanged, so this change won't
353
affect existing code.  The macros were formerly defined in tok.t
354
rather than in the header because they were meant as private macros
355
for internal use within the Tokenizer class itself, not for client
356
code that uses the Tokenizer class.  However, they're also useful in
357
subclasses of Tokenizer, so it's desirable to have them defined in a
358
header - that way, user code implementing Tokenizer subclasses can
359
access the macros simply by #including tok.h.
360
361
<li>The compiler is now stricter about interpreting tokens as
362
BigNumber constants.  In the past, the compiler treated an "E"
363
following a numeric constant as an exponent signifier, even if no
364
digits followed.  For example, "3E-a" was taken to be the BigNumber
365
constant "3E-0", followed by a separate token "a".  The compiler now
366
treats an "E" as the start of a separate token if no digits follow it
367
(or the optional + or - sign after the "E"), so "3E-a" would now be
368
treated as four tokens: "3", "E", "-", and "a".
369
370
<li>The compiler now displays a specific error if it finds a decimal
371
digit within an octal constant value.  In the past, the compiler
372
simply assumed that a decimal digit terminated the octal constant
373
token and started a new token.  This typically led to a confusing
374
parsing error, since the compiler saw two consecutive numeric constant
375
tokens where the user almost always intended one.  The compiler now
376
flags a specific error about the ill-formed octal value, and skips any
377
decimal digits following the octal constant, which makes the error
378
much easier to pinpoint.
379
380
<li>The compiler is now strict about disallowing the old TADS 2
381
"&lt;&gt;" (unequal-to) operator.  This variation was not documented,
382
but has up to now been allowed.
383
384
<li>The compiler no longer treats <tt>delete</tt> as a reserved word.
385
(It did so in the past as a hold-over from TADS 2, where
386
<tt>delete</tt> is indeed reserved.)
387
388
</ul>
389
390
391
<!------------------------------------------------------------------------>
392
<h3>Changes for 3.0.15 (3/8/2007)</h3>
393
394
<ul>
395
396
<li>When an input event script is being played back, the inputFile()
397
function now prompts the user if the result would likely overwrite an
398
existing file.  inputFile() in this case prompts the user
399
interactively, momentarily halting script playback until the user
400
responds.  This is described more fully in the Input Scripts section
401
of the System Manual.
402
403
<li>The compiler reported an internal error ("too much unsplicing") in
404
certain complex expressions involving multi-line string literals as
405
macro arguments in embedded &lt&lt; &gt;&gt; expressions.  This has
406
been corrected.
407
408
</ul>
409
410
411
<!------------------------------------------------------------------------>
412
<h3>Changes for 3.0.14 (2/9/2007)</h3>
413
414
<ul>
415
416
<li>The raiseToPower() method of the BigNumber class incorrectly
417
returned 1 as the result of raising 0 to a non-zero exponent.  The
418
correct result should, of course, be 0 for any positive exponent, and
419
an exception for any non-positive exponent (as 0^0 is undefined, and
420
0^n with n&lt;0 is effectively division by zero).  The method now
421
yields these results.
422
423
</ul>
424
425
426
<!------------------------------------------------------------------------>
427
<h3>Changes for 3.0.13 (1/19/2007)</h3>
428
429
<ul>
430
431
<li>A new t3make option, -we, tells the compiler to treat warnings as
432
though they were errors, for the purposes of determining whether or
433
not to proceed with compilation after a warning occurs.  When the
434
compiler finds an error within a source file, it stops the build
435
process after finishing with that compilation unit, requiring you to
436
fix the error before continuing.  In contrast, warnings do not, by
437
default, interrupt the build.  This is because a warning message
438
indicates a situation that's <i>technically</i> correct, but which
439
contains a common pitfall.  Compiler warnings tend to be right often
440
enough to warrant close inspection, so many programmers adhere to the
441
discipline of insisting on "clean" builds every time - that is, with
442
no warning messages.  The -we option is a convenient way of enforcing
443
that discipline.  When you specify the -we option, the compiler will
444
stop the build after finishing with any module that generates any
445
warning messages, just as it does for error messages.  If you want
446
to explicitly set the default mode, where warnings do not interrupt
447
the build, use the -we- option.
448
449
<li>A new interpreter (t3run) option, -I, runs a command script in
450
"echo" mode.  This works almost the same as the existing -i option,
451
but -I causes all output to be displayed to the console as the script
452
is read; in contrast, -i reads the script in "quiet" mode, meaning
453
that no output is displayed while the script is running.
454
455
<li>The command script recorder and player can now handle virtually
456
any input event type, not just command lines.  The script mechanism
457
can now handle keyboard input, hyperlinks, ad hoc dialogs, and file
458
dialogs; the functions inputKey(), inputEvent(), inputFile(), and
459
inputDialog() can now take their input from a script.  (inputLine()
460
and inputLineTimeout() have always been able to read from scripts.)
461
To handle the greater range of event types, a new script file format
462
has been added; files written in new format are called Event Scripts.
463
Event scripts are identified by a special signature: the first line of
464
the file must read <tt>&lt;eventscript&gt;</tt>, with nothing else on
465
the line (not even spaces).  If a script doesn't start with this
466
signature, the script reader will interpret it as the original script
467
format, which is now called the Command-line Script.  This allows old
468
scripts to work without changes; of course, Command-line Scripts can
469
only contain line input events, as they always have.  When you create
470
a script with RECORD or the with the Interpreter's -o option, the
471
script is now recorded in the new Event Script format, and the
472
recorder will automatically include all event types in the script.
473
(There's no option with RECORD or -o to record an old-style
474
Command-line Script instead - there wouldn't seem to be much call for
475
this, as the functionality in Event Scripts is a superset of that of
476
Command-line Scripts.)  The new scripting functionality is described
477
in the "Input Scripts" chapter of the System Manual.
478
479
<li>The setScriptFile() intrinsic function now accepts a new type
480
code, LogTypeEvent.  This type signifies that a new-style Event Script
481
should be created.  The code LogTypeCommand, which was present in
482
previous versions, continues to signify that an old-style Command-line
483
Script should be created.
484
485
<li>Input scripts now nest during playback.  In the past, reading from
486
a new input script terminated reading from any input script already in
487
effect.  Now, the console suspends the original script, and resumes
488
reading from it upon reaching the end of the new script.  Scripts can
489
be nested to any depth.  This allows an input script to "include"
490
another by using, for example, the REPLAY command within the script.
491
492
<li>In the past, the getFuncParams() intrinsic function didn't accept
493
an anonymous function as its argument.  Anonymous functions are now
494
accepted.
495
496
<li>The inputLine() intrinsic function (in the 'tads-io' function set)
497
didn't correctly map non-ASCII characters (such as accented letters)
498
from the user's input to Unicode.  This has been corrected.
499
500
<li>A compiler bug caused a crash if a "modify" or "replace" statement
501
in one source module referred to a symbol that was actually defined in
502
a source module that was included in the build after the first source
503
file.  This is an error condition anyway - a symbol has to be defined
504
in the build before it can be modified or replaced, so the original
505
definition has to occur in a source module listed earlier than the
506
modifying module.  However, the compiler now handles such an error
507
properly, by displaying the appropriate error message and halting the
508
build.
509
510
<li>A bug in File.writeBytes() caused unpredictable results, sometimes
511
including an interpreter crash, if a zero or negative value was passed
512
for the starting index.  The starting index is now checked for range.
513
514
<li>Some internal changes to the portable VM and compiler code have
515
been made to improve portability to 64-bit architectures.
516
517
</ul>
518
519
520
<!------------------------------------------------------------------------>
521
<h3>Changes for 3.0.12 (9/15/2006)</h3>
522
523
<p><b>This is the TADS 3.0 General Release version.</b>
524
525
<ul>
526
527
<li>A couple of compiler error messages were internally mis-numbered,
528
which could have caused the compiler to report the wrong error message
529
for the affected error codes.  These have been corrected.
530
531
</ul>
532
533
534
<!------------------------------------------------------------------------>
535
<h3>Changes for 3.0.11 (9/8/2006)</h3>
536
537
<ul>
538
539
<li>The % operator now accepts only integer operands.  (In the past,
540
it failed to throw an error if a BigNumber operand was used, and
541
instead produced a meaningless result.)
542
543
<li>A comparison of the form "a==b", where a is an integer value and b
544
is a BigNumber value, now coerces the integer to a BigNumber before
545
comparing it.  In the past, this type of comparison coerced the
546
integer to a BigNumber only when the BigNumber was the left-hand
547
operand.  This correction ensures that "a==b" and "b==a" yield the
548
same results when comparing integers and BigNumber values.  The same
549
change applies to the != operator.
550
551
<li>In the past, the compiler reserved the names <tt>void</tt>,
552
<tt>int</tt>, <tt>string</tt>, <tt>list</tt>, <tt>boolean</tt>, and
553
<tt>any</tt>.  These names are no longer reserved and thus can now be
554
used freely as symbol names (for local variables, object names, etc).
555
(These names were originally reserved in anticipation of the eventual
556
introduction of optional static type declarations.  Reserving the
557
keywords ensured that no one would write code that would be
558
incompatible if the feature had ever been added.  The static typing
559
feature will definitely not appear in the official 3.0 release, and at
560
this point it seems very unlikely to be in any future version, so
561
there's no longer any good reason to reserve these names.)
562
563
<li>A compiler bug caused invalid code to be generated in the following
564
situation:
565
566
<p><pre>
567
   x: object
568
     m(p) { }
569
     n = (p)  // bad code generated here
570
     p = nil
571
   ;
572
</pre>
573
574
<p>The bad code resulted from the compiler mistakenly using the local
575
symbol table from the method m(p) while generating the code for n; so
576
the compiler incorrectly treated p as a parameter variable in n, even
577
though n has no parameters.  This has been corrected.
578
579
<p>The local-to-Unicode character set mapper now converts any
580
unmappable character found in a source string to Unicode U+FFFD, the
581
standard Unicode "replacement character."  In the past, the mapper
582
converted unmappable characters to question marks, "?".  Converting to
583
question marks was undesirable because of the ambiguity it created.
584
When compiling source code, for example, it led the compiler to think
585
that the source file literally contained a question mark where the
586
unmappable character was found; the diagnostics the compiler reported
587
in these cases were thus confusing and misleading.  Unicode defines
588
the character U+FFFD specifically for the purpose of replacing source
589
characters that cannot be mapped to Unicode; this gives the compiler
590
and other consumers of mapped characters an unambiguous indication
591
that the original input character was unmappable.  The compiler uses
592
this new information to report a specific diagnostic message when it
593
finds a U+FFFD in the input stream.
594
595
</ul>
596
597
<!------------------------------------------------------------------------>
598
<h3>Changes for 3.0.10 (8/17/2006)</h3>
599
600
<ul>
601
602
<li>Libraries (".tl" files) can now easily include their own
603
multimedia resources in a build.  In the past, there was no direct
604
support for multimedia resources in libraries; an author using a
605
library that included multimedia resources would have had to copy the
606
library resources into the game's directory tree and then explicitly
607
add those resources to the build.  This is no longer necessary.  Two
608
new features support library resources:
609
610
  <ul>
611
612
  <li>First, Workbench for Windows now automatically adds each
613
  top-level library's directory path to the search list for individual
614
  resource files (.jpg, .png, .ogg, etc).  Note that a "top-level"
615
  library is a library included directly in the Project window; a
616
  library included from within another library isn't top-level, so
617
  it's directory won't be included in the search list.  When running
618
  the game under the debugger, this allows individual resources to be
619
  found under any library's directory tree.
620
621
  <li>Second, the compiler accepts a new "resource:" keyword in
622
  library (.tl) files.  After this keyword, list one individual
623
  resource file, or one directory containing resource files.  You can
624
  use this keyword as many times as you like to include multiple files
625
  or directories.  As usual for library files, the file or directory
626
  mentioned after the "resource:" keyword is given with a URL-style
627
  relative path, relative to the library containing the library file.
628
629
  </ul>
630
631
These new features allow a library to include multimedia resources
632
with complete transparency to game authors using the library - game
633
authors won't have to do anything extra to use the library multimedia
634
resources.  Library authors only have to perform a few easy extra
635
steps.  First, create a subdirectory of your library directory to
636
contain the resources.  For example, if your library is called
637
mylib.tl, create a "mylibres" subdirectory under the directory
638
containing mylib.tl.  (The name isn't important, but it's desirable to
639
pick a unique enough name that there won't be any conflict with other
640
libraries that game authors might also be including.  Your resources
641
will be named relative to the subdirectory name, so don't pick a
642
generic name like "resources" - it's best to use a name that
643
incorporates your library name.)  Second, put all of your library's
644
resources (.jpg files, .png files, etc.) in your new subdirectory.
645
Third, add the line "resource: mylibres" to your .tl file; this will
646
tell the compiler to bundle all of the files in the "mylibres"
647
subdirectory into the compiled .t3 file when a game includes your
648
library.  Finally, in the HTML that your library generates to
649
reference your resources, refer to them using your subdirectory path -
650
for example, you'd write &lt;IMG SRC="mylibres/compass.png"&gt; to
651
refer to an image resource file.
652
653
<li>The <a href="sysman/t3vm.htm">t3GetStackTrace()</a>
654
function (in the 't3vm' function set) has a new optional argument that
655
lets you get information on a single stack level.  This provides more
656
efficient access to stack trace information in cases where you only
657
want information on a specific level, such as the immediate caller.
658
659
<li>When a game is compiled into a stand-alone executable (on systems
660
where this is implemented, such as Windows), it's now possible to pass
661
command-line arguments to the embedded .t3 program.  To do this, use a
662
dash ("-") to separate the interpreter arguments from the program
663
arguments.  The stand-alone version of the interpreter is also now
664
strict about not accepting an image file argument; this means that you
665
can't use a bundled stand-alone game to run a different .t3 image file.
666
667
<li>You can now write directly to the main game window's log file, if
668
one is open.  (This is the log file that's opened via the setLogFile()
669
function - the one that the library creates when the player types the
670
SCRIPT command.)  There are two ways to write to the log file.  The
671
simple way is to use the new &lt;LOG&gt; tag - this tag is simply the
672
complement of the &lt;NOLOG&gt; tag: any text enclosed between
673
&lt;LOG&gt; and &lt;/LOG&gt; will be included only in the log file,
674
and hidden in the game window.  This approach is usually the right
675
one, because you can mix your log-only text directly with other output
676
text, ensuring that it's processed through the usual stack of output
677
filters and the like.  However, on occasion it's useful to be able to
678
bypass the usual output stream mechanism, which brings us to the
679
second way: you can use logConsoleSay(), passing in the special handle
680
value MainWindowLogHandle as the handle.  Using this approach bypasses
681
mainOutputStream and all of its filters, and goes directly to the log
682
file.
683
684
<li>The compiler now warns on nested block comment ("/* ... */"
685
comments).  If the compiler finds a "/*" sequence within a block
686
comment, it generates a warning.  (Nested block comments aren't
687
allowed, so a "/*" within a block comment usually indicates that a
688
previous comment wasn't terminated properly.  The warning makes it
689
easier to notice such cases.)
690
691
<li>The compiler now automatically word-wraps error messages to 80
692
columns when the "verbose" error message option is selected.  This
693
makes the long error messages much easier to read, especially in
694
Workbench, which has an essentially infinitely wide message window -
695
the word-wrapping saves you the trouble of manually scrolling
696
horizontally to see the full message text.
697
698
<li>A bug in the compiler sometimes caused a crash if a 'foreach'
699
statement was used in a source file which never #included the system
700
headers.  The compiler correctly flagged the error, but didn't always
701
recover properly.  The compiler now handles this situation gracefully.
702
703
<li>A bug in the compiler caused the compiler to ignore the last line
704
of a library (.tl) file when the last line didn't end in a newline
705
character of some sort.  The same bug affected Workbench on Windows.
706
This has been corrected.
707
708
<li>A bug in the compiler caused incorrect results when a 'grammar'
709
statement's token list started with an empty alternative.  For
710
example, the token list "( | 'x')" was compiled incorrectly.  This
711
problem only occurred when the empty alternative was the <i>first</i>
712
element of the entire token list.  This has been corrected.
713
714
<li>In the past, the TadsObject type didn't retain 'undo' information
715
when the superclass list was changed with setSuperclassList().  This
716
meant that if an object's superclass was changed, an 'undo' operation
717
didn't properly restore the original superclass list.  This has been
718
corrected; this undo information is now properly retained and applied.
719
720
<li>A bug introduced in 3.0.9 caused the interpreter to misinterpret
721
certain Unicode characters outside of the plain ASCII range when
722
entered on a command line.  This has been fixed.
723
724
<li>A bug in TadsObject.setSuperclassList() caused sporadic problems.
725
The bug was most likely to manifest itself as a stack overflow error
726
when a call to self.setSuperclassList() was the first (or nearly the
727
first) executable code within a method.  The bug is now fixed.
728
729
<li>The regular expression parser didn't accept the special character
730
pattern &lt;tab&gt;, which is documented as matching the character
731
'\t' (or, equivalently, '\u0009').  This has been corrected.
732
733
<li>The regular expression parser didn't formerly classify as
734
whitespace several control characters that are conventionally
735
considered whitespace.  This was due to a strict interpretation of the
736
character properties defined in the Unicode character database, which
737
defines all of the ASCII control characters as class "Other" rather
738
than "Separator."  The Unicode database has some additional property
739
information, though, that does mark the appropriate control characters
740
as whitespace, and the character classifier now takes this extra
741
information into account.  This means that characters \u0009 (tab),
742
\u000A (line feed), \u000B (line tab), \u000C (form feed), \u000D
743
(carriage return), \u001c (IS4), \u001d (IS3), \u001e (IS2), and
744
\u001f (IS1) are now considered whitespace, and thus match the
745
&lt;space&gt; character class pattern in regular expressions.
746
747
<li>In the past, the compiler always assumed it was running under a
748
DOS box, so it used the DOS box code page for any messages it
749
displayed.  On most systems, depending on localization, the DOS box
750
uses a different code page from the Windows code page used by native
751
Windows applications; this is because the DOS box is designed for
752
compatibility with old MS-DOS applications, which sometimes rely upon
753
the DOS line-drawing characters and so forth.  This occasionally
754
caused odd character mapping problems in error messages when compiling
755
from Workbench, because Workbench uses the standard Windows code page
756
instead of the DOS code page.  This has been corrected, as follows:
757
the compiler now checks to see if it's associated with a DOS box
758
window, and uses the DOS box code page for its error messages if so,
759
or the regular Windows code page if not.
760
761
</ul>
762
763
764
<!------------------------------------------------------------------------>
765
<h3>Changes for 3.0.9 (8/29/2005)</h3>
766
767
<ul>
768
769
<li>The banner API has a new pair of style flags: BannerStyleHStrut
770
("horizontal strut") and BannerStyleVStrut ("vertical strut").  These
771
style flags let you specify that bannerSetSize() should take a child
772
banner's width (horizontal strut) and/or height (vertical strut) into
773
account when figuring the parent banner's content size.  By default,
774
only the contents of the parent banner are considered, but these new
775
styles let you include a child's contents in the parent banner's size
776
calculation.
777
778
<li>The File intrinsic class has a new feature in its various "open"
779
methods.  The filename passed to an "open" method can now be one of a
780
set of distinguished values (defined in file.h) that identify
781
"special" files.  These are files that are meant to be used for
782
particular purposes.  Rather than opening these files by name, you
783
open them by specifying their special identifiers.  The interpreter
784
determines the actual name and location of a special file in the local
785
file system.  This allows the interpreter to use different names of
786
paths on different systems, to better conform to local conventions.
787
Currently, there's only one special file defined: LibraryDefaultsFile,
788
which is a text file that's used to store the library's global
789
settings.
790
791
<li>The new GrammarProd method <a href="sysman/gramprod.htm">
792
getGrammarInfo()</a> provides programmatic access to information on
793
GrammarProd objects, which allows the game to retrieve full
794
information on the 'grammar' statements in the source code.  Sample
795
code demonstrating how to use the new method to display a production's
796
internal information in human-readable format is included in the
797
samples directory, in the file gramdisp.t.
798
799
<li>The interpreter now uses the default file-contents character set
800
rather than the display character set as the default for log file
801
output.  On most systems, this change won't have any noticeable
802
effect, as the default display and file-contents character sets are
803
usually the same anyway.  However, on a few systems, the display and
804
file-contents character sets can differ; it makes more sense on these
805
systems to use the file-contents character set for log files than it
806
does to use the display character set, since it's usually desirable to
807
treat log files as ordinary text files.
808
809
<li>The new interpreter option "-csl <i>charset</i>" lets you
810
explicitly specify the character set for log files, overriding the
811
default.  (The default log file character set is the file-contents
812
character set, as described above.)
813
814
<li>The logConsoleCreate() function now accepts nil for the character
815
set argument.  This chooses the default log file character set.
816
817
<li>In tadsio.h, the constant InEvtNotimeout has been renamed to
818
InEvtNoTimeout (that is, the "T" in "Timeout" has been capitalized).
819
This change is simply cosmetic, for better consistency with the naming
820
convention that each word in a symbol name starts with a capital
821
letter.  (The "o" in "Timeout" is still a minuscule, and this is
822
consistent with the naming convention: in computerese, "timeout" is
823
usually considered a single word.)  To avoid breaking compatibility
824
with code based on previous versions, the old name is still defined as
825
a synonym for the new name.
826
827
<li>The Vector class's constructor now throws an error ("value out of
828
range") if the maximum-length argument exceeds 65535, which is the
829
maximum number of elements that a Vector can have.  (In the past,
830
attempting to create a vector with a maximum length of more than 65535
831
appeared to succeed, but didn't really; it actually created a vector
832
with a maximum of <i>n</i> mod 65536, where <i>n</i> was the given
833
length.)
834
835
<li>The compiler incorrectly considered the statement following a
836
'do-while' loop reachable if the loop's condition wasn't a constant
837
'true' expression, even if the condition itself was never reachable
838
and the loop contained no 'break' statements.  This caused the
839
compiler to issue spurious warnings in certain obscure situations,
840
such as when such a 'do-while' was at the end of a function that had
841
returned values elsewhere; it also caused the compiler to fail to
842
generate an "unreachable statement" warning when a statement followed
843
such a loop.  The compiler now correctly realizes that the statement
844
following such a loop is unreachable, and generates control flow
845
warnings accordingly.
846
847
<li>A compiler bug sometimes caused problems when generating code
848
involving a nested anonymous function (that is, an anonymous function
849
defined within another anonymous function), which was defined within
850
an object method, <i>and</i> which made reference to local variables
851
defined within two or more enclosing lexical contexts.  The problem
852
only affected code with all of these attributes, and then only showed
853
up some of the time.  The problem manifested itself as a spurious
854
run-time error ("invalid index operation - this type of value cannot
855
be indexed") when the nested anonymous function was invoked.  This
856
has been corrected.
857
858
<li>A bug in the compiler caused sporadic problems that sometimes
859
included crashing the compiler when source code contained a constant
860
expression involving a list indexed by a value exactly one greater
861
than the number of elements in the list, as in "[1,2][3]".  The
862
problem only occurred when everything in the expression - all of the
863
list elements, as well as the index value - was a constant.  This has
864
been fixed.
865
866
<li>Due to a bug, the compiler didn't recognize the "^="
867
(XOR-and-assign) operator.  This has been corrected.
868
869
<li>A bug in the rexGroup() function caused the interpreter to crash
870
in a particular, rare situation: specifically, when rexGroup() was
871
called immediately after a call to rexSearch() or rexMatch() that
872
caused a run-time error.  This has been corrected.
873
874
<li>A bug in the interpreter sometimes caused unpredictable behavior,
875
including crashes, when t3SetSay() was used to set a property pointer
876
handler, and a double-quoted string was then displayed from within a
877
function (not an object method).  This has been fixed.
878
879
<li>A bug in the interpreter's console-output subsystem's HTML
880
mini-parser caused subtle problems in some rare cases with the full
881
multimedia interpreters (but not in text-only interpreters).  For the
882
most part, in the full HTML interpreters, the console subsystem just
883
passes HTML markups directly through to the HTML renderer.  It does,
884
however, keep track of HTML sequences for its own purposes.  One of
885
these is to apply the "\^" and "\v" (capitalize and un-capitalize)
886
flags to actual text rather than to HTML markups.  The bug caused the
887
HTML tracker to lose track of where it was in an HTML sequence when a
888
tag included quoted attribute values.  The only known symptom of the
889
bug was that a "\^" or "\v" flag that appeared immediately before an
890
HTML tag that contained quoted attribute values was sometimes
891
misapplied to text within the HTML tag, effectively losing the effect
892
of the flag.  This has now been fixed.
893
894
<li>A bug in the Dictionary class caused problems when setting a
895
string comparator object that wasn't a StringComparator object.  The
896
Dictionary allowed setting the new comparator, but would then generate
897
a spurious error (usually "invalid type") on calling any of the
898
methods that called comparator methods (addWord, findWord, etc).  This
899
has been corrected.
900
901
<li>The Vector.copyFrom() method had a bug that caused the wrong
902
number of elements to be copied in some cases.  In particular, when
903
the destination vector had to be expanded to hold the new elements,
904
the method copied one fewer element than was requested.  This has been
905
fixed.
906
907
<li>A compiler bug caused duplicate "unreachable statement" to be
908
displayed when a 'switch' contained a case with an unreachable
909
'break' statement.  The duplicate messages no longer occur.
910
911
<li>Due to a bug, the compiler sometimes crashed if a 'switch'
912
statement contained an unreachable 'break' statement in one of its
913
cases, <i>and</i> the statement immediately after the 'switch' was
914
also unreachable.  This has been fixed.
915
916
<li>The compiler is now more consistent about where double-quoted
917
strings are allowed and not allowed.  First, superficial parentheses
918
are now accepted around double-quoted strings wherever the strings
919
would otherwise be legal.  Second, the comma operator can now be used
920
to juxtapose two or more double-quoted strings; the effect is simply
921
to display the strings in the order given, as though they had been
922
concatenated into a single string.  Third, the compiler formerly
923
accepted double-quoted strings, incorrectly, if they were used within
924
the 'true' or 'false' operands of a '?:' operator that was embedded
925
within any larger expression.  The compiler now correctly flags this
926
as an error.
927
928
<li>The compiler is now stricter about flagging errors for a few
929
syntactically invalid constructs that were formerly accepted.  It's
930
probably counterintuitive that more error messages are a good thing,
931
but, really, they are in cases like this - if a construct is invalid,
932
you're better off if the compiler catches it and tells you about it,
933
because otherwise the compiler is going to do something poorly defined
934
with the input.  Without an error message, it won't be obvious that
935
anything is amiss until the program starts behaving unexpectedly at
936
run-time.  The compiler now properly flags errors when it detects
937
these constructs.  Specifically, the compiler now enforces the
938
following grammar rules:
939
940
<ul>
941
942
<li>Each formal parameter in a 'propertyset' declaration, including
943
the "*" parameter, must be separated by exactly one comma from adjacent
944
parameters.
945
946
<li>'transient' cannot be used in the definition of a new template -
947
that is, "transient <i>class</i> template ..." is illegal.
948
949
<li>Empty templates ("<i>class</i> template;") are illegal.
950
951
<li>Parentheses are required around the condition expression of
952
a do-while statement.
953
954
</ul>
955
956
<li>The compiler now allows "local" declarations to be labeled
957
(via regular labels as well as "case" and "default" labels).  In
958
the past, the compiler didn't allow labeled local declarations.
959
There wasn't any good reason for this restriction; it was just
960
a quirk of the way the compiler's grammar was defined.
961
962
<li>The toString() function formerly failed on conversions to base 2
963
of a value over 262143, with a run-time exception.  This has been
964
corrected, so the function should now properly convert any 32-bit
965
integer value to a base 2 string representation.
966
967
<li>The toInteger() function now accepts base 2 as the input format.
968
969
</ul>
970
971
<li>The compiler is now more tolerant of different newline formats in
972
library (.tl) files.  In the past, the compiler generally expected .tl
973
files to conform to local newline conventions; this made it more
974
difficult to re-use libraries on different operating systems, since it
975
was sometimes necessary to convert newlines first.  Source code files
976
(.t and .h files) were never affected by this, but the part of the
977
compiler that read .tl files wasn't as flexible.  The compiler's .tl
978
file reader now accepts essentially any newline format: it will accept
979
newlines consisting of CR-LF sequences, LF-CR sequences, simple CR
980
newlines, and simple LF newlines.  It doesn't matter what your
981
computer's native newline conventions are - every port of the compiler
982
will now accept any of these formats.
983
984
<li>Due to a bug, the compiler's macro preprocessor didn't properly
985
expand macros that included the #ifempty or #ifnempty operators.
986
In particular, any text in the macro's definition prior to the
987
#ifempty or #ifnempty was effectively discarded; the text wasn't
988
included in the expansion.  This is now fixed.
989
990
991
<!------------------------------------------------------------------------>
992
<h3>Changes for 3.0.8 (9/12/2004)</h3>
993
994
<ul>
995
996
<li>The compiler now enforces unique naming for all of the modules in
997
a project.  Using the same name for two (or more) modules can cause
998
problems, mostly because both modules would have the same filename for
999
their object files and thus one would overwrite the other.  In the
1000
past, when a module name conflict caused this kind of problem, the
1001
compiler reported the errors caused by the name collision, but it
1002
wasn't always easy to figure out that the name collision was the root
1003
cause.  To avoid this potential source of confusion, the compiler now
1004
checks the entire project for module name collisions, and flags an
1005
error if any collisions are found.
1006
1007
<li>The "file safety" levels have changed slightly to provide better
1008
security against malicious game programs.  First, level 2, which
1009
formerly provided global read access but no write access, now instead
1010
provides read/write access to the current working directory only (the
1011
game isn't allowed any access to files outside of the working
1012
directory).  Second, the default safety level is now level 2.  In the
1013
past, level 1 (read from any file/write to current directory only) was
1014
the default, which left open the possibility that a game could access
1015
data outside of the working directory.  A malicious game could
1016
conceivably have exploited this by, for example, secretly copying
1017
sensitive data to the game directory for later use by a coordinating
1018
network worm, or by encoding the data in a hyperlink (displayed in an
1019
HTML-enabled game) that takes the player to a spyware site when
1020
clicked.  The new default setting should effectively eliminate these
1021
risks by barring access to any files outside of the working directory.
1022
1023
<li>Several of the system headers formerly lacked #include directives
1024
for other headers they depended upon.  This didn't cause problems most
1025
of the time, since the necessary headers were usually included from
1026
somewhere else anyway, but it meant that you had to include system
1027
headers in the right order to avoid compiler errors.  Each of the
1028
system headers now explicitly includes any other headers it depends
1029
upon, which ensures that each system header can be included in
1030
isolation, and in any order with respect to other headers.
1031
1032
<li>The saveGame(), restoreGame(), and restartGame() intrinsic
1033
functions can now be called from recursive VM invocations (that is,
1034
from contexts where a call to an intrinsic function or method has
1035
invoked a byte-code callback function, such as an anonymous function
1036
passed to an iteration method on a collection object).  This restriction
1037
was needed in the distant past, but it's been vestigial since version
1038
3.0.5a (when the save/restore mechanism was overhauled to exlude the
1039
call stack and execution context from the saved state information).
1040
Since the restriction is no longer necessary, it's now been removed.
1041
1042
<li>In the intrinsic function getLocalCharSet(), the new constant
1043
CharsetFileCont can be used to retrieve the name of the character set
1044
typically used for the contents of text files on the local system.
1045
(Note that this is only the <i>typical</i> character set for text
1046
files on the local system; there's no guarantee that any particular
1047
file uses this character set.  The actual character set of a given
1048
text file is determined by the user and application that created the
1049
file.)
1050
1051
<li>In tadsio.h, the constant CharsetFile (for use with the
1052
getLocalCharSet() function) has been renamed to CharsetFileName.  The
1053
name change is to emphasize that the constnat refers to the character
1054
set used in the local file system for <i>names</i> of files, as
1055
opposed to the <i>contents</i> of text files.
1056
1057
<li>The compiler sometimes incorrectly complained about a missing
1058
option argument when a "-x" option (with a valid argument supplied)
1059
was used at the very end of a command line.  This has been corrected.
1060
1061
<li>A bug in the compiler occasionally caused floating point constants
1062
that included exponential ("E" suffixes) to be mis-parsed.  When this
1063
happened, one or more spurious, random extra digits of precision were
1064
added to the end of the number's mantissa.  This has been corrected.
1065
1066
</ul>
1067
1068
<!------------------------------------------------------------------------>
1069
<h3>Changes for 3.0.7 (6/12/2004)</h3>
1070
1071
<p><i>There are no changes to the compiler or interpreter core in
1072
this release.  The only changes in the adv3 library and the
1073
Windows HTML TADS interpreter.</i>
1074
1075
<!------------------------------------------------------------------------>
1076
<h3>Changes for 3.0.6q (5/9/2004)</h3>
1077
1078
<p><i>There are no changes to the compiler or interpreter core in this
1079
release.  The only changes are in the adv3 library and the Windows
1080
HTML TADS interpreter.</i>
1081
1082
1083
<!------------------------------------------------------------------------>
1084
<h3>Changes for 3.0.6p (4/25/2004)</h3>
1085
1086
<ul>
1087
1088
<li>The regular expression parser now accepts the special character
1089
codes &lt;lbrace&gt; and &lt;rbrace&gt; for left and right "curly"
1090
braces, "{" and "}", respectively.  Since curly braces are special
1091
characters in regular expressions, it's convenient to have named
1092
character codes for them.
1093
1094
<li>In the past, the regular expression parser accepted a closure
1095
modifier (a "*", for example) directly following an assertion
1096
expression.  Since assertions don't consume any input text, repeating
1097
one with a closure doesn't change the meaning of an expression, so a
1098
closure following an assertion is meaningless.  However, doing so had
1099
the undesirable effect of creating an infinite loop, as the regular
1100
expression matcher tried pointlessly to find out how many times a
1101
successful assertion could be successful (the answer is always: as
1102
many times as you try).  The regular expression parser now avoids such
1103
infinite loops by simply ignoring any closure modifier that's applied
1104
to an assertion.  (Note, however, that you can still trick the parser
1105
into building an infinite loop with a more complex expression.  For
1106
example, you can enclose one or more assertions in parentheses, and
1107
then apply a closure to the parenthesized group.  The regexp parser
1108
isn't sophisticated enough to detect these more subtle infinite loops;
1109
it can only detect the obvious kind where a closure is applied
1110
directly to an assertion.)
1111
1112
<li>A bug in the compiler caused incorrect results when an anonymous
1113
function referred to a property of "self," when the function was
1114
defined within a list value of a property.  The property evaluation
1115
within the anonymous function typically yielded nil in these cases,
1116
even when that property had a non-nil value in the object containing
1117
the property with the list value containing the anonymous function.
1118
The same problem showed up whether the property containing the list
1119
value was defined with the ordinary "prop = val" syntax or with a
1120
template.  This has been corrected; properties of self will now yield
1121
correct results in these cases.  To be more concrete, in the example
1122
below, evaluating testObj.prop1[1]() should display "hello!" on the
1123
console, and now does this correctly; but in the past, this example
1124
displayed nothing, because the evaluation of prop2 within the
1125
anonymous function yielded nil.
1126
1127
<p><pre>  testObj: object 
1128
    prop1 = [ {: say(prop2) } ] 
1129
    prop2 = 'hello!'  
1130
  ;
1131
</pre>
1132
1133
<li>A bug in the compiler caused the compiler to crash in some cases
1134
when presented with an anonymous function within a list value of an
1135
object property defined with a template.  The problem has been
1136
corrected.
1137
1138
<li>The compiler incorrectly reported a standard-level warning when a
1139
function or method "list parameter" was unused within the function or
1140
method.  (A list parameter is a formal parameter defined in square
1141
brackets to indicate that it receives a list containing the actual
1142
parameters, which can vary in number, when the method is called.)  The
1143
compiler also incorrectly reported the warning as an assigned but
1144
unused value; it should have reported it as an unused parameter
1145
instead.  The compiler now reports the correct warning, and only
1146
reports it at "pedantic" level; this makes the handling of list
1147
parameters consistent with the treatment of ordinary formal
1148
parameters.
1149
1150
</ul>
1151
1152
1153
<!------------------------------------------------------------------------>
1154
<h3>Changes for 3.0.6o (3/14/2004)</h3>
1155
1156
<ul>
1157
1158
<li>The MIME type for saved position files has been changed to
1159
"application/x-t3vm-state".  The Windows installers have been updated
1160
to reflect the new MIME type.
1161
1162
</ul>
1163
1164
1165
<!------------------------------------------------------------------------>
1166
<h3>Changes for 3.0.6n (3/6/2004)</h3>
1167
1168
<ul>
1169
1170
<li>The debugger now automatically includes "self" in the local
1171
variable list whenever examining a frame in which "self" is valid.
1172
1173
<li>On Windows, the installers now add the MIME type for the compiled
1174
game file type (.t3) and the saved position file type (.t3v) to the
1175
system registry.  This information can be helpful to applications,
1176
particularly those that perform file transfers.  (The MIME type for
1177
a compiled game is "application/x-t3vm-image", and the type for
1178
saved position files is "application/x-t3vm-save".)
1179
1180
<li>A compiler bug caused the compiler to crash when certain obscure
1181
kinds of syntax errors occurred inside nested object definitions.
1182
This has been corrected.
1183
1184
<li>A bug in the compiler caused the compiler to crash when it was
1185
attempting to parse a one-line function or method that contained an
1186
unclosed anonymous function.  The problem was most likely to be seen
1187
when the errant one-liner was the last thing in a source file.  The
1188
compiler now generates appropriate error messages and terminates
1189
normally.
1190
1191
<li>A bug in the ByteArray class caused the VM to crash when a
1192
ByteArray was used as a key in a LookupTable.  This has been
1193
corrected.
1194
1195
<li>A bug in the BigNumber class caused the VM to crash in some cases
1196
when a string was used as the source value to construct a new
1197
BigNumber.  This should now work reliably.
1198
1199
<li>A bug in the debugger caused a crash when execution stopped
1200
inside an anonymous function with no 'self' context.  The most common
1201
place to encounter this problem was at a run-time error in an
1202
anonymous function defined inside a list, such as in an EventList
1203
object.  The problem has been corrected.
1204
1205
<li>On Windows, the Author's Kit installer failed to create the
1206
samples\obj subdirectory.  That subdirectory is required to build
1207
the sample game (sample.t3m) included in the kit, so you had to
1208
manually create the directory before you could compile the game.
1209
The installer now automatically creates the directory.
1210
1211
<li>The BigNumber class incorrectly returned a result of zero when
1212
dividing zero by zero.  (This only happened when the dividend was
1213
zero; for other dividend values, a divide-by-zero exception was
1214
correctly thrown.)  This now throws a divide-by-zero exception.
1215
1216
</ul>
1217
1218
<!------------------------------------------------------------------------>
1219
<h3>Changes for 3.0.6m (11/15/2003)</h3>
1220
1221
<p><i>Note: 3.0.6l was a library-only release, so there was no system
1222
release called 3.0.6l.</i>
1223
1224
<ul>
1225
1226
<li>The propNotDefined mechanism is now invoked when 'inherited'
1227
fails to find a base class implementation of the method being
1228
inherited.  This works almost exactly the same way it does when
1229
propNotDefined is invoked during a normal method/property call,
1230
with only one difference: when 'inherited' fails to find a base
1231
class property, it searches for a 'propNotDefined' using the
1232
same search pattern it used to seek the original inherited
1233
property.  For example, consider this code:
1234
1235
<p><pre>
1236
  export propNotDefined;
1237
1238
  class A: object
1239
    propNotDefined(prop, [args]) { "This is A.propNotDefined\n"; }
1240
  ;
1241
1242
  class B: A
1243
    propNotDefined(prop, [args]) { "This is B.propNotDefined\n"; }
1244
    p1() { inherited(); }
1245
  ;
1246
1247
  main(args)
1248
  {
1249
    local x = new B();
1250
    x.p1();
1251
  }
1252
</pre>
1253
1254
<p>When this program is run, the result displayed will be "This is
1255
A.propNotDefined".  B.p1() attempts to inherit the base class
1256
definition of p1(); when it doesn't find an inherited definition, it
1257
searches for propNotDefined() using the same search pattern it used
1258
to find the inherited p1().  That is, the search starts with B's
1259
superclass, because that's where the search for the inherited p1()
1260
started from.
1261
1262
<li>The t3SetSay() intrinsic function now returns the previous default
1263
output function or method.  (The return value corresponds to the
1264
argument value: if the argument sets a new function pointer, the
1265
return value is the old function pointer; if the argument is a new
1266
property ID, the return value is the old property ID.)  This allows
1267
code to save the old value for later restoration, if desired.  In
1268
addition, the new special argument values T3SetSayNoFunc and
1269
T3SetSayNoMethod can be specified to cancel any existing default
1270
output function or method, respectively, and the function returns
1271
these values when needed to indicate the absence of a previous
1272
setting.
1273
1274
<li>The t3SetSay() function now accepts an anonymous function as
1275
the default output function.  (In the past, only a regular named
1276
function was acceptable.)
1277
1278
<li>When propNotDefined() is invoked, the interpreter now sets
1279
'targetprop' to &amp;propNotDefined.  In the past, the interpreter
1280
incorrectly set 'targetprop' to the property originally invoked.
1281
This was incorrect; one important consequence was that it didn't
1282
allow propNotDefined() itself to use 'inherited' to invoke the base
1283
class's implementation.
1284
1285
<li>The compiler now automatically adds a property called
1286
'sourceTextOrder' to each non-class object defined in a source file.
1287
The value of the property is an integer giving the object's order in
1288
the source file in which it's defined.  This value is defined to
1289
increase monotonically throughout a source file, so you can use it to
1290
sort a collection of objects into the same order in which they appear
1291
in the source text.  This property is useful when you want to create
1292
an initialized structure of objects (such as a list or a tree), and
1293
you want objects within the structure to have the same order at
1294
run-time that they have in the source text.  In the past, there was
1295
no straightforward way to guarantee source text ordering, because
1296
the compiler and linker assign object ID's in arbitrary order.
1297
This new property is guaranteed to reflect the original source
1298
text order, so you can use it to initialize the run-time order.
1299
Note that a 'modify' statement doesn't assign a new sourceTextOrder
1300
to the underlying object; the original sourceTextOrder is retained
1301
for a modified object.  Note also that sourceTextOrder only tells you
1302
the relative order of objects within a single source file; the compiler
1303
resets the counter at the start of each new source file, so it's not
1304
meaningful to compare sourceTextOrder values for objects in different
1305
source modules.
1306
1307
<li>The toInteger() function now accepts an integer value as its
1308
first argument.  If the first argument is an integer, the function
1309
simply returns the same value; the optional second argument (the
1310
radix value) is ignored if present.
1311
1312
<li>The BigNumber constructor now accepts another BigNumber as the
1313
source value.  This creates a new BigNumber with the given source
1314
value at an optional new precision, rounding the original value if
1315
the new precision is less than that of the source value.
1316
1317
<li>The BigNumber method formatString() incorrectly returned an empty
1318
string when formatting a fractional number if the maximum digit count
1319
for formatting was insufficient to reach the first non-zero digit of
1320
the fractional value.  For example, 0.0001.formatString(3) returned
1321
an empty string.  The method now returns '0' for these cases.
1322
1323
<li>In most of the character-mode interpreters, if a line of
1324
highlighted or colored text appeared just before a "MORE" prompt,
1325
subsequent text was incorrectly highlighted or colored like the
1326
line before the "MORE" prompt.  This has been fixed.
1327
1328
<li>The character-mode interpreters very occasionally crashed on exit,
1329
due to a bug in the termination code.  This has been corrected.
1330
1331
<li>In most of the character-mode interpreters that support the
1332
"-plain" mode, the interpreter is now more thorough about flushing
1333
the standard output before stopping to read input.  This makes the
1334
plain mode interoperate better with other programs using "pipes"
1335
and similar OS-specific input/output redirection.  This change pertains
1336
to the MS-DOS and Unix versions, and to any other platforms based on
1337
the common character-mode layer (known technically as "osgen3").
1338
1339
<li>The rand() function now accepts a Vector as its argument.
1340
A vector argument behaves the same as a list argument: the function
1341
randomly chooses one of the elements of the vector and returns it.
1342
1343
<li>A bug in the TadsObject.createInstanceOf() method caused an
1344
incorrect value to be left on the VM stack during creation of the
1345
new object.  This showed up as an incorrect argument value if a
1346
method was invoked on the new object as part of the createInstanceOf()
1347
expression.  This has been corrected.
1348
1349
<li>The text-only interpreters incorrectly paid attention to a
1350
&lt;BODY&gt; tag within an &lt;ABOUTBOX&gt; tag, setting any color
1351
scheme specified in the &lt;BODY&gt; tag.  This improperly set the
1352
main text window to the color scheme intended only for use inside
1353
the about-box.  This no longer occurs.
1354
1355
<li>The forEachAssoc() method of the List and Vector intrinsic classes
1356
incorrectly passed a zero-based index for the 'key' parameter to the
1357
callback (that is, the first element was identified by index 0, the
1358
second by index 1, etc., C-style).  This should have been a one-based
1359
index for consistency with all of the other indexing operations for
1360
List and Vector.  This is now fixed.
1361
1362
<li>Vector.setLength() will now throw an error if the given length
1363
is less than zero.  (In the past, it accepted an invalid length,
1364
leading to unpredictable results.)
1365
1366
<li>Under certain conditions, the debugger didn't stop in response to
1367
a "Break" key (Ctrl-C, Ctrl+Break, or whatever key is appropriate to
1368
local convention).  In particular, if a single line of code contained
1369
an infinite loop, and the user ran the program, broke into the loop
1370
once, and then resumed execution, the debugger ignored subsequent
1371
break keys.  This has been corrected.
1372
1373
<li>The compiler incorrectly reported errors in the branches of an
1374
'if' statement at the line of the 'if' itself if the branches were
1375
bare statements (not enclosed in braces).  The same applied to
1376
'while', 'for', and 'do while' statements when their bodies were bare
1377
statements.  The compiler now reports these errors at the
1378
sub-statement locations.
1379
1380
<li>The compiler generated an incorrect debugger line number record
1381
under certain obscure circumstances: if the source file contained an
1382
object or class based on multiple superclasses, and the class didn't
1383
define an explicit constructor, then the compiler generated an
1384
incorrect line record for the last executable line of code in the
1385
file.  This is now fixed.
1386
1387
<li>The compiler now shows Unicode escape sequences when displaying an
1388
error message containing characters from the source file that can't be
1389
represented in the compiler console character set.  For example, if
1390
you're running the compiler in a terminal window on Unix, and your
1391
terminal window is set up to display Latin-1 (ISO-8859-1) characters,
1392
and you're compiling a source file prepared in Latin-2, your terminal
1393
window would be unable to correctly display some of the characters in
1394
the source file, because Latin-2 has characters that aren't part of
1395
Latin-1.  In the past, if any of these "unmappable" characters were
1396
shown as part of a compiler error message, the compiler showed them as
1397
question marks.  Now, the compiler shows them as "backslash" escape
1398
sequences.  For exampe, Latin-2 character 171, "T with caron," would
1399
be displayed as "\u0164", since its Unicode code is 0x164.  This
1400
change doesn't affect the display of compatible characters - all
1401
mappable characters will still be displayed in the local character
1402
set.  This only affects characters that were formerly displayed as
1403
question marks.
1404
1405
<li>The default "file safety level" is now 1, which allows reading
1406
from any file and writing only to the current working directory.
1407
This default setting provides games with reasonable flexibility, but
1408
helps prevent the possibility that a malicious author can modify
1409
important files on your hard disk by limiting writing operations to
1410
the game's working directory only.  You can override this using
1411
the "-s" option if you want to set a more permissive or more
1412
restrictive safety level.
1413
1414
<li>In Workbench for Windows, the "Build for Release" command
1415
didn't properly invoke the "t3res" command for building external
1416
resource files (.3r0, etc).  This now works properly.
1417
1418
<li>A problem in the debugger caused sporadic bad behavior when a
1419
finalizer method threw an exception (out of the finalize() method;
1420
throwing around exceptions within a finalizer was fine, as long as the
1421
exception was caught entirely within the finalizer).  This manifested
1422
itself in numerous different ways, ranging from no visible effects
1423
to full Workbench crashes.  The problem only occurred in the debugger;
1424
the regular non-debug VM didn't have the problem.  This has now
1425
been corrected.
1426
1427
<li>The VM now recovers more gracefully from stack overflow
1428
exceptions.  In the past, stack overflows tended to be unrecoverable
1429
because the VM would usually encounter a second stack overflow in the
1430
course of trying to create an exception object to represent the
1431
original stack overflow, forcing the VM to terminate the game
1432
summarily to avoid an infinite loop of exceptions thrown while
1433
handling exceptions thrown while handling exceptions, ad infinitum.
1434
The VM now keeps a small emergency reserve of stack space for
1435
handling stack overflow errors, which should in most cases allow an
1436
exception object to be created normally, which in turn allows the
1437
game to catch and handle the exception just like any other run-time
1438
error.
1439
1440
<li>The debugger now gives you more flexibility in recovering from
1441
stack overflow errors.  In the past, if your program caused a stack
1442
overflow (due to infinite recursion, for example), the debugger
1443
itself was unable to evaluate expressions without itself encountering
1444
stack overflows, since the debugger shares the stack with the VM.
1445
The debugger now holds some of the stack in reserve specifically for
1446
handling stack overflows; when a stack overflow occurs, the debugger
1447
uses the reserve for its own purposes, allowing you to evaluate
1448
expressions and carry on normally within the debugger.  This makes it
1449
easier to figure out why the stack overflow occurred.  Note that you
1450
can often use the debugger to recover from a stack overflow by
1451
manually moving the execution pointer to a 'return' statement (or the
1452
end of the method), breaking off the infinite recursion that caused
1453
the overflow.
1454
1455
<li>The debugger now shows anonymous functions more descriptively in
1456
stack traces.  In the past, these showed a string like
1457
"[1234].prop#0(5,6)"; now, the debugger shows "{anonfn:1234}(5,6)"
1458
instead.  The "1234" is an internal object identifier for the
1459
anonymous function; this conveys no specific human-readable meaning
1460
other than to distinguish one function from another.  The
1461
corresponding change has also been made in reflect.t, in
1462
reflectionServices.formatStackFrame().
1463
1464
</ul>
1465
1466
1467
<!------------------------------------------------------------------------>
1468
<h3>Changes for 3.0.6k (8/17/2003)</h3>
1469
1470
<ul>
1471
1472
<li>The debugger now supports stop-on-change conditional breakpoints.
1473
When you create a breakpoint with a condition expression, the debugger
1474
now offers a choice between stopping when the expression evaluates to
1475
true or stopping when the expression's value changes.  In the past,
1476
there was no choice, and only stop-when-true conditions were
1477
supported.  Stop-on-change is now the default when creating a new
1478
global breakpoint.
1479
1480
<li>The system.tl library now includes the default system startup
1481
module, _main.t.  In addition, it sets the new library flag, "nodef",
1482
to indicate that the library replaces the default system modules that
1483
the compiler would otherwise include in the build automatically.  This
1484
change primarily benefits users of Workbench for Windows, in that it
1485
causes Workbench to include _main.t explicitly in the list of source
1486
files.  This makes it more convenient to view the file within
1487
Workbench, set breakpoints inside it, and trace into it.  (This change
1488
will have no effect on most existing games.  The only games affected
1489
would be those that include system.tl <i>and</i> include a
1490
non-standard startup module, using the "-nodef" compiler flag to
1491
suppress the default inclusion of _main.t.  This is an unlikely
1492
scenario, but if it applies, here's what to do: drop the "-nodef"
1493
compiler flag from your project file, and instead add "-x _main"
1494
immediately after the "-lib system" inclusion.)
1495
1496
<li>The new directive "nodef" can appear within a library (.tl) file.
1497
This instructs the compiler that the library includes the same modules
1498
that the compiler would include by default, or replacements for the
1499
standard modules.  If a library includes the "nodef" directive, then
1500
including that library in the build has the same effect as including
1501
the "-nodef" option on the compiler command line or in the project
1502
(.t3m) file.
1503
1504
<li>In the past, the text-only interpreters didn't properly handle banner
1505
size settings that exceeded the available screen size.  The text-only
1506
interpreters will now limit a banner's size to the available space on
1507
the screen when the requested size is too large.
1508
1509
<li>The AnonFuncPtr intrinsic class now correctly identifies itself as
1510
a subclass of Vector (via ofKind and getSuperclassList).
1511
1512
<li>The AnonFuncPtr intrinsic class now compares and hashes by
1513
reference, rather than by value as its Vector base class does.
1514
1515
<li>The banner function bannerSetSize(), when applied to a text window
1516
(BannerTypeText), now takes into account the space used for margins
1517
and borders when sizing in "absolute" units.  This ensures that if you
1518
ask for a height of five rows, for example, then the window will
1519
actually be large enough to display five rows in the default font,
1520
without any scrolling.  In the past, the margins weren't taken into
1521
account, so the actual capacity of a banner wasn't necessarily
1522
the same as the requested nominal size in absolute units.
1523
1524
<li>The run-time symbol table now omits "intrinsic class modifier"
1525
objects.  These objects have been filtered out of firstObj/nextObj
1526
iterations since 3.0.6c; they're now filtered out of the symbol table
1527
for the same reasons, and for consistency with firstObj/nextObj.  (In
1528
the past, these objects appeared as symbols of type object, with names
1529
of the form " 99", and with no superclasses.  These are internal
1530
implementation objects that are meaningless to the game program, so
1531
there's no reason for the symbol table to include them.)
1532
1533
<li>A problem in the List and String classes caused the VM to crash in
1534
certain very rare cases when evaluating properties of constant list or
1535
string values.  This has been corrected.
1536
1537
<li>A bug in the Dictionary intrinsic class's findWord() method
1538
sometimes caused strange behavior, most noticeably as corruptions in
1539
the values of local variables in the invoking code.  The problem only
1540
occurred when the method was called in its single-argument form.  The
1541
problem has been fixed.
1542
1543
</ul>
1544
1545
<!------------------------------------------------------------------------>
1546
<h3>Changes for 3.0.6j (8/2/2003)</h3>
1547
1548
<ul>
1549
1550
<li>The new TadsObject method setSuperclassList() enables the game
1551
program to change an object's superclass list dynamically.  The
1552
method takes a list giving the new superclass list for the object.
1553
1554
<li>It's now legal to explicitly define a 'location' property in an
1555
object definition that also uses the '+' notation to set the object's
1556
location.  The compiler specifically treats an explicit 'location'
1557
property setting as overriding the value set with the '+' notation,
1558
rather than considering the redefinition a conflict as it did in the
1559
past.  This allows logically related object definitions to be kept
1560
close together in the source code even when some of the objects are
1561
part of a location tree and others are not; this happens fairly
1562
frequently, because simulation objects sometimes have abstract helper
1563
objects that don't participate in the normal location hierarchy.
1564
1565
<li>Templates can now include alternative groups that are optional.
1566
If any element of an alternative group is marked as optional, then
1567
the whole group of alternatives is optional.
1568
1569
<li>The new macro perInstance(expr), defined in the system header
1570
file tads.h, can be used to define a property in a class such that
1571
the property will be set to the value of the expression 'expr'
1572
separately for each instance of the class.  For each instance,
1573
the expression is evaluated the first time that instance's value
1574
of the property is accessed, and then stored with that instance.
1575
1576
<li>The compiler now has the ability to bundle resource files into
1577
the image (.t3) file as part of the main compilation ("t3make") step,
1578
without running the "t3res" utility as a separate step.  This lets
1579
you include resource files in your project's makefile (the .t3m
1580
file), which means the makefile can now specify the entire build
1581
procedure for most types of projects.  To add resources with t3make,
1582
add the new "-res" option <i>after</i> all of your source and library
1583
modules in the .t3m file, and list your resource files after the "-res"
1584
option.  The syntax for the resource list following the "-res" option
1585
is the same as the "t3res" utility, except that the "-add" option is
1586
not allowed (as adding resources is the only possibility).
1587
1588
<li>Workbench for Windows now allows you to add a resource file to a
1589
project before the resource file exists.  To add a resource file that
1590
you haven't yet created, use the usual menu command to add a resource
1591
file, then type the name of the file into the file selector dialog.
1592
The dialog will allow you to type the name of a file that doesn't
1593
yet exist.  This is handy when you want to include a resource file
1594
that won't be created until your pre-initialization code runs, such
1595
as the "gameinfo.txt" file.
1596
1597
<li>The compiler is now able to determine automatically if relinking
1598
is needed due to a change in the set of modules included in the build.
1599
This is accomplished by checking a small bit of additional data in the
1600
.t3 about the set of object modules involved in the build.  (The new
1601
information is simply a 32-bit "checksum" of the module source file
1602
list, so it adds only four bytes to the image file.  It's not enough
1603
information to allow a user to recover a list of your source files by
1604
reverse-engineering the image file, so you don't have to worry about
1605
any possibility that a user could obtain "hints" this way.  Because
1606
only a checksum is stored, there's a very small possibility that a
1607
change to the source file list could result in an identical checksum,
1608
in which case the compiler would not notice that relinking is
1609
required.  The probability of this happening is extremely small, but
1610
if you ever suspect it, you can always use the "-al" option to force a
1611
relink.)  Note that this doesn't affect the compiler's use of file
1612
timestamps to determine build dependencies; this is simply an
1613
additional check the compiler makes to detect when a new module is
1614
added to the build or an old module is removed.
1615
1616
<li>The ByteArray intrinsic class has two new methods, readInt() and
1617
writeInt(), that make it easy to translate between integer values and
1618
byte representations of those values.  This is especially useful for
1619
reading and writing binary files.  The new methods let you read and
1620
write integers in 8-bit, 16-bit, and 32-bit sizes, signed or unsigned,
1621
and in little-endian or big-endian format.
1622
1623
<li>The File intrinsic class has a new method, getFileSize(), which
1624
returns the size in bytes of the file.
1625
1626
<li>A bug in the File intrinsic class sometimes caused the VM to
1627
crash when a read operation was attempted after a seek operation.
1628
This has been corrected.
1629
1630
<li>The starter game templates now include startup handling for
1631
startup-and-restore.  When the player launches the interpreter using a
1632
saved-game file, the interpreter invokes the startup-and-restore code,
1633
which the game must provide in a routine called mainRestore().  The
1634
starter templates now include a mainRestore() routine, and handle
1635
main() and mainRestore() using a common subroutine called
1636
mainCommon().  This change will make it much simpler for authors to
1637
include proper startup-and-restore support in their games, by
1638
providing a ready-made framework with the necessary code.
1639
1640
<li>Fixed a bug in Workbench for Windows: checkboxes in the Project
1641
window didn't work for nested libraries; clicking on the checkbox
1642
for a nested library simply had no effect.  These checkboxes now
1643
work properly; clicking on a library checkbox checks or unchecks
1644
the library and all of the files within the library.
1645
1646
<li>The Win32 character-mode interpreter (t3run.exe) now includes
1647
a desktop icon in the executable file.  This allows you to use the
1648
"-icon" option with maketrx32 to add your own custom icons to games
1649
you bundle as executables using the console-mode interpreter.
1650
1651
<li>A bug in the regular expression matcher failed to handle the
1652
shortest-match closure modifier (specified with a '?' suffix to a
1653
'*' or '?'  operator) properly.  This bug was introduced in the
1654
regular expression processor rework in 3.0.6h, and has now been
1655
corrected.
1656
1657
<li>In certain unusual cases, the debugger incorrectly included a
1658
property in property enumerations when the property was actually a
1659
method.  This happened when a method overrode a property defined as a
1660
simple data value in a superclass.  The debugger isn't meant to show
1661
methods in property enumerations, since invoking a method will
1662
naturally invoke any side effects of the method.  This has been
1663
corrected.
1664
1665
<li>In Workbench for Windows, projects created in the root directory
1666
of a disk (C:\, D:\, etc) caused a number of problems, including
1667
crashes during compilation.  These problems have been corrected, so
1668
creating a project in a root directory is now safe.
1669
1670
<li>In Workbench for Windows, the compiler incorrectly wrote the
1671
object files to the working object directory when compiling for
1672
release, overwriting the object files for the debug build.  This
1673
didn't do any harm apart from requiring a full recompile for debugging
1674
after any release build, which the compiler automatically sensed and
1675
performed, but it caused an unnecessary delay.  The compiler now
1676
correctly sends release build object files to a temporary directory,
1677
so that the debug build object files are retained through a release
1678
build.
1679
1680
<li>The new-project wizard in Workbench for Windows will no longer
1681
accept a source filename that ends in an extension reserved for
1682
makefiles or compiler-generated files (.t3m, .t3, .t3o, .t3s).  This
1683
makes it more difficult to accidentally create a source file that will
1684
be overwritten by the compiler or by Workbench with generated files.
1685
1686
<li>The compiler will now recompile an object file if the symbol file
1687
is more recent.  Compilations that fail due to a syntax error can
1688
leave a project partially compiled, so that all of the symbol files
1689
but not all of the object files have been recompiled.  In the past,
1690
correcting such an error and then recompiling did not always compile
1691
all of the necessary modules.  This change ensures that all modules
1692
noted as requiring compilation on the first attempt will be noted
1693
again on subsequent attempts, even if the first attempt fails part-way
1694
through.
1695
1696
<li>Due to a bug in the VM, throwing exceptions out of a native-code
1697
callback context (such as out of the callback to a Vector or
1698
LookupTable iteration method) sometimes caused the VM to lose track of
1699
the calling exception handlers; this caused symptoms such as sending
1700
the exception to a "catch" block other than the innermost eligible
1701
one.  This problem tended to show up when an exception was thrown out
1702
of a callback context, and then the same exception was thrown again on
1703
a later invocation.  This has been corrected.
1704
1705
<li>If a Vector contains a reference to itself, or to a Vector
1706
containing a reference to the first Vector, indirectly to any depth,
1707
then an attempt to compare the Vector to another Vector, or an attempt
1708
to use the Vector as a key in a LookupTable, will fail with a run-time
1709
exception ("maximum equality test/hash recursion depth exceeded").
1710
Since Vector equality comparisons and hash calculations are defined
1711
recursively by value, Vectors with direct or indirect self-references
1712
cause the equality and hash calculations to recurse infinitely; the
1713
Vector class avoids this infinite recursion by throwing the exception
1714
when the recursion becomes too deep.  Note that this also effectively
1715
limits the depth of a Vector tree when used in an equality test or
1716
hash value calculation, even if the tree is acyclic; the limit is
1717
256 levels.
1718
1719
<li>When reading input from a script (using the REPLAY command, for
1720
example), the interpreter now ignores morePrompt() calls.  This
1721
allows script replay to proceed unattended, without unnecessary
1722
interactive pauses.
1723
1724
<li>In the debugger, if the game was interrupted by a real-time event
1725
while the player was editing a command line, and the debugger took
1726
control (via a breakpoint, for example) inside the real-time event,
1727
and the game was then terminated from within the debugger (while
1728
still stepping through the real-time event code) and then later
1729
restarted, a bug in the console manager caused strange behavior,
1730
sometimes including crashing the debugger.  This has been corrected.
1731
1732
</ul>
1733
1734
1735
<!------------------------------------------------------------------------>
1736
<h3>Changes for 3.0.6i (6/15/2003)</h3>
1737
1738
<ul>
1739
1740
<li>Due to a compiler bug, when a template was defined using the "|"
1741
symbol to list a set of alternatives for a token position, object
1742
definitions using the template failed to match the last alternative
1743
of a set.  All alternatives in a set are now properly recognized.
1744
1745
<li>The gameinfo.t module has been removed.  In its place is a new
1746
mechanism in the library that writes the GameInfo file automatically
1747
during pre-initialization, based on the definitions in the game's
1748
GameID object.
1749
1750
<li>The Tokenizer class now gives each rule a name, which is simply a
1751
string value by which the rule can be identified.  This changes the
1752
format of the rule list entries - each rule list entry has the new
1753
name value as its first element.  Any subclasses or modifications
1754
of Tokenizer must use the new rule format.
1755
1756
<li>The Tokenizer class has some new methods that allow rules to be
1757
added or removed.  insertRule(rule, curName, after) inserts the new
1758
rule given by 'rule' before or after the existing rule named
1759
'curName'; the new rule is inserted before the existing rule if
1760
'after' is nil, after the existing rule if 'after' is true.
1761
insertRuleAt(rule, idx) inserts the new rule given by 'rule' at the
1762
index given by 'idx' in the rule list.  deleteRule(name) deletes the
1763
existing rule with the given name, and deleteRuleAt(idx) deletes the
1764
existing rule at the given index in the rule list.
1765
1766
</ul>
1767
1768
1769
<!------------------------------------------------------------------------>
1770
<h3>Changes for 3.0.6h (6/7/2003)</h3>
1771
1772
<ul>
1773
1774
<li>The "modify" keyword can now be used to define functions.  Modifying
1775
a function works just like replacing a function with the "replace" keyword,
1776
except that the new function can invoke the previous version of the
1777
function by using the "replaced" keyword.  Refer to the
1778
<a href="sysman/proccode.htm">Procedural Code</a> section of the
1779
documentation for details.
1780
1781
<li>Two new TadsObject methods, createInstanceOf() and
1782
createTransientInstanceOf(), enable a program to dynamically
1783
instantiate an object based on multiple superclasses.  Refer to the <a
1784
href="sysman/tadsobj.htm">TadsObject reference</a> for
1785
details of the new methods.
1786
1787
<li>The <a href="sysman/objdef.htm">object template</a> syntax has
1788
been extended to include optional elements and alternative elements.
1789
An element is marked optional by placing a question mark after it;
1790
alternative elements are separated by '|' tokens.
1791
1792
<li>Several string search and regular expression intrinsics accept a
1793
new optional argument specifying the starting index in the string for
1794
the search.  If the index argument is specified, then the search will
1795
start from the given character index; the index value 1 indicates
1796
that the search starts from the first character of the string, which
1797
is the default if the index parameter is omitted.  This change allows
1798
algorithms that search for repeated occurrences of a substring or
1799
pattern to be written more efficiently, since they won't have to
1800
split up the source string to continue searching for additional
1801
occurrences.
1802
1803
  <ul>
1804
     <li>String.find(str, index?)
1805
     <li>String.findReplace(origStr, newStr, flags, index?)
1806
     <li>rexMatch(pat, str, index?)
1807
     <li>rexSearch(pat, str, index?)
1808
     <li>rexReplace(pat, str, replacement, flags, index?)
1809
  </ul>
1810
1811
<li>A new banner style flag, BannerStyleMoreMode, causes a banner
1812
window to use "MORE" mode.  This means that any time text displayed to
1813
the banner fills the available vertical space in the banner window,
1814
the interpreter will display some sort of prompt to the user, and then
1815
wait for the user to acknowledge the prompt.  The exact nature of the
1816
prompt and acknowledgment varies by platform; usually, the interpreter
1817
displays a prompt like "[MORE]" at the bottom of the overflowing
1818
window, and waits for the user to press a key.  The purpose of MORE
1819
mode is to ensure that the user always has a chance to read all of the
1820
displayed text before it scrolls off the screen.  Note that
1821
BannerStyleMoreMode implies BannerStyleAutoVScroll, since it only
1822
makes sense to pause for a MORE prompt when new text would cause old
1823
text to scroll away, and this only happens when the auto-vscroll style
1824
is used.
1825
1826
<li>The forEachInstance() function now allows the callback to break
1827
out of the iteration loop by throwing a BreakLoopSignal exception.
1828
Throwing this exception simply terminates the loop and returns to
1829
the caller of forEachInstance().  You can conveniently throw the
1830
exception using the "breakLoop" macro (defined in tads.h).
1831
1832
<li>A new utility function has been added to the base library (in
1833
_main.t): instanceWhich(<i>cls</i>, <i>func</i>).  This function
1834
iterates over instances of the given class <i>cls</i>, and calling
1835
<i>func</i> on each instance; <i>func</i> is a pointer to a function
1836
taking one parameter, which is the current instance in the iteration.
1837
instanceWhich() returns the first instance for which the callback
1838
function <i>func</i> returns a non-nil and non-zero value.  Note that
1839
the function iterates instances in arbitrary order, so if there are
1840
multiple instances of <i>cls</i> for which <i>func</i> returns true,
1841
the return value will simple be the first of these visited in the
1842
arbitrary iteration order.  If <i>func</i> doesn't return a
1843
non-nil/non-zero value for any instance of <i>cls</i>, the function
1844
returns nil.
1845
1846
<li>The setLogFile() function now takes an optional second parameter
1847
specifying the type of log file to open or close.  The possible values
1848
are LogTypeTranscript, to create a transcript of all input and output;
1849
and LogTypeCommand, to create a record of only the input commands.
1850
The default, if the parameter is omitted, is LogTypeTranscript.
1851
1852
<li>The character mapper now accepts the IANA standard names for
1853
the various Unicode encodings supported in TADS 3: "UTF-8", "UTF-16BE"
1854
(for the 16-bit big-endian encoding), and "UTF-16LE" (for the 16-bit
1855
little-endian encoding).  These names are case-insensitive, and can
1856
be used anywhere a character encoding name is required (#charset,
1857
new Charset(), etc).  The old non-standard names for the same
1858
character sets ("utf8", "unicodeb", and "unicodel") are still accepted
1859
as well.
1860
1861
<li>The compiler now accepts source files that start with a Unicode
1862
UTF-16 byte-order marker (i.e., the "FF FE" or "FE FF" byte sequences)
1863
and <i>also</i> specify a #charset directive.  The #charset directive
1864
in such cases must (1) itself be encoded in the 16-bit Unicode
1865
encoding implied by the byte-order marker, and (2) designate the
1866
character set name that matches the byte-order marker (so a file
1867
encoded in big-endian UTF-16 must have a #charset "utf-16be"
1868
directive, and a file encoded in little-endian UTF-16 must have a
1869
#charset "utf-16le" directive).  The #charset directive is optional in
1870
these cases, since the compiler can correctly infer the encoding based
1871
on the byte-order marker alone.
1872
1873
<li>The compiler now accepts source files that start with a Unicode
1874
UTF-8 byte-order marker.  The compiler infers that the file is encoded
1875
in UTF-8 if it sees this sequence.  Note that there is only one valid
1876
UTF-8 encoding, so the UTF-8 byte order marker is always the same
1877
(i.e., there is no "big-endian" or "little-endian" flavor of UTF-8;
1878
there's only UTF-8).  A #charset "utf-8" directive is allowed but not
1879
required immediately after the UTF-8 three-byte byte-order marker
1880
sequence.  This change is required because some text editors that save
1881
in UTF-8 format write the byte-order marker character at the start of
1882
the file.
1883
1884
<li>A new compiler option, -quotefname, tells the compiler to quote
1885
filenames when reporting the source file location of an error.  If
1886
this option is specified, the compiler encloses these filenames in
1887
double quotes, and "stutters" any double-quote characters that are
1888
part of the filenames themselves (that is, each double-quote character
1889
that's actually part of a filename is shown as two double-quote
1890
characters in a row).  This change is intended to make it easier
1891
for automated tools to parse the compiler's error message output,
1892
by ensuring that filenames can be predictably parsed regardless of
1893
any special characters that might appear within.
1894
1895
<li>The compiler now displays an initial status message indicating
1896
the number of files it will need to build.  This is designed for
1897
use by automated tools, to give them an estimate of the amount of
1898
work to be done; this can be used, for example, to show a progress
1899
bar indicator as the compilation proceeds.
1900
1901
<li>In the compiler options file (the .t3m file), certain options (-I,
1902
-o, -Os, -FL, -FI, -Fs, -Fy, -Fo, -source, -lib) can be specified
1903
using URL-style notation, to ensure portability of the .t3m file
1904
across different operating systems.  In the past, the compiler didn't
1905
properly translate these options to local conventions when they
1906
contained '/' characters to separate path elements.  The compiler
1907
now properly converts URL-style paths to local conventions.
1908
1909
<li>When an object is defined with an undefined or invalid superclass
1910
name, and the object definition uses a template to define property
1911
values, the compiler now reports an "undefined superclass" error
1912
rather than an error with the template format.  In cases where a
1913
superclass name is merely misspelled, the compiler will naturally
1914
fail to find a matching template for the object, since the misspelled
1915
superclass name probably doesn't have any templates associated with
1916
it; thus, the template error is secondary to the true problem, which
1917
is the misspelled superclass name.  This change should make the
1918
diagnostics more useful by reporting the true problem rather than the
1919
missing-template side effect.
1920
1921
<li>Text Grid windows no longer consolidate runs of whitespace;
1922
instead, all whitespace written to a text grid window is treated
1923
literally.
1924
1925
<li>Text Grid windows incorrectly interpreted HTML markups in the
1926
text-only interpreters.  This has been corrected; text displayed to
1927
text grids is now treated literally on all interpreters.
1928
1929
<li>Workbench now automatically saves the project (.t3m) file settings
1930
upon starting execution of the game in the debugger, and also saves
1931
the recent game order whenever a new game is loaded.  These measures
1932
help reduce the chance of data loss in the event that Workbench
1933
crashes while the game is running (which it ideally <i>should</i>
1934
never do at all, but until the glorious day when it's perfectly
1935
bug-free, this extra saving will at least make crashes a little less
1936
painful).
1937
1938
<li>Due to a bug, Workbench on Windows did not start up correctly
1939
when it was started by double-clicking on a .t3m file from the
1940
Windows desktop.  (Workbench started with a blank interpreter
1941
window, but didn't show the main Workbench IDE window at all.)
1942
This has been corrected.
1943
1944
<li>A bug in the debugger caused the debugger to crash under certain
1945
obscure circumstances.  In particular, the crash occurred if the game
1946
caused a stack overflow, and the overflow happened to occur on a
1947
recursive VM invocation from an intrinsic method (such as when an
1948
intrinsic class method invokes an anonymous function callback).  This
1949
has been corrected.
1950
1951
<li>In the past, the compiler generated an output function call for
1952
the intial empty portion of a double-quoted string of the form
1953
"&lt;&lt;expr&gt;&gt;..." (in other words, a string with an embedded
1954
expression immediately after the open quote).  The compiler no longer
1955
generates this superfluous empty string output operation, slightly
1956
reducing code size and execution time.
1957
1958
<li>The String intrinsic class failed to enforce the 64k length limit
1959
for an individual string in some cases; exceeding the limit caused
1960
problems ranging from corrupted string text to crashes.  This has
1961
been corrected; the interpreter now throws a run-time exception
1962
("string is too long") if creating a string (via concatenation, for
1963
example) would exceed this limit.  The List intrinsic class is
1964
likewise more assertive now about enforcing its 64k limit as well.
1965
1966
<li>The regular expression functions (rexMatch, rexSearch, rexReplace)
1967
were capable of causing the interpreter to crash (with a system stack
1968
overflow) when asked to match a pattern to an extremely long string.
1969
The exact limits varied by platform according to the amount of system
1970
stack space available; on Windows, the problem started occurring with
1971
strings about 5,000 characters long, although the exact length was
1972
also a function of the complexity of the regular expression pattern.
1973
This has been corrected; the regular expression matcher no longer uses
1974
a recursive algorithm, so its consumption of system stack space is now
1975
fixed and small.  The matcher still consumes memory that scales
1976
according to the length of the input string and the complexity of the
1977
regular expression, since such memory consumption is inherent in the
1978
task; but the memory consumed is no longer in the system stack, which
1979
means among other things that the matcher can now recover gracefully
1980
(by throwing an "out of memory" run-time exception) if it should
1981
exhaust available memory while working.
1982
1983
<li>In the DOS/Windows version, the executable file bundler
1984
(maketrx32) didn't look for the character map library file
1985
(cmaplib.t3r) in the correct location; it looked in the directory
1986
containing the original interpreter executable rather than the
1987
"charmap" subdirectory of the interpreter directory; since the
1988
installer puts cmaplib.t3r in the subdirectory, the bundler failed to
1989
find the file and omitted it from the bundled executable.  The program
1990
now looks in the "charmap" subdirectory.
1991
1992
<li>A bug caused the compiler to crash on certain types of syntax
1993
errors.  If a long string (around 1,000 bytes or longer) was
1994
misplaced in a few specific contexts, the error message generator
1995
overflowed an internal buffer trying to include the text of the
1996
string in the error message.  This should no longer occur.
1997
1998
<li>The compiler now flags an error if a grammar production defines
1999
more than 65,535 alternatives.  This limit is imposed by the .t3 file
2000
format for grammar rules, but it's undesirable to get anywhere close
2001
to the limit because of performance cost.  It's possible to exceed
2002
the limit with relatively concise grammar rule definitions, because
2003
the compiler expands the permutations of rules defined with '|'
2004
alternatives.  Grammar rules that contain complex sets of
2005
permutations using '|' alternatives should generally be rewritten
2006
using sub-productions, which will allow equally complex rules without
2007
the overhead of expanding the permutations.
2008
2009
<li>In reflect.t, reflectionServices.valToSymbol() can now correctly
2010
identify the reflectionServices object itself.  (Due to a bug, this
2011
caused a run-time error in the past.)
2012
2013
<li>In reflect.t, reflectionServices.valToSymbol(), looking up an unnamed
2014
object now returns a string giving the superclass list of the object,
2015
if the superclass names are available.  The format of the return value
2016
is now '(obj:sc1,sc2)', where 'sc1' and 'sc2' are the names of the
2017
superclasses (naturally, more or fewer superclass names will appear
2018
according to the actual number of superclasses of the object).  The
2019
string 'obj' is literally present.  If none of the superclasses have
2020
names, then the traditional result, '(obj)', is returned.  If some
2021
superclasses have names but others don't, then the full list will
2022
be returned, with '(anonymous)' used for any unnamed superclass.
2023
2024
</ul>
2025
2026
2027
<!------------------------------------------------------------------------>
2028
<h3>Changes for 3.0.6g (4/12/2003)</h3>
2029
2030
<ul>
2031
2032
<li>The new interpreter option -R lets you specify the root folder
2033
for individual resources.  By default, the root resource folder is
2034
the folder that contains the image (.t3) file.  If -R is specified,
2035
then the interpreter will look for resources in the given folder when
2036
they can't be found in the image file itself or in a resource bundle
2037
file.  Note that this isn't a search list; only one -R option can be
2038
in effect.
2039
2040
<li>Added a new method, isRoundTripMappable(), to the
2041
<a href="sysman/charset.htm">CharacterSet intrinsic class</a>.  This new
2042
method provides an easy way to determine if a set of characters
2043
has an exact, one-to-one mapping in a given local character set.
2044
2045
<li>The compiler now warns when a grammar rule ends with an empty
2046
alternative, or is completely empty.  Empty rules at the top level of
2047
a grammar rule are uncommon, and it's easy to accidentally leave a '|'
2048
at the end of a rule, especially while actively defining new rules.
2049
To eliminate this new warning, you can use an empty pair of
2050
parentheses, "()", to explicitly indicate an empty rule.  This warning
2051
only applies to the outermost grouping level of a rule; empty rules
2052
within parenthesized portions of rules are not flagged.
2053
2054
<li>Fixed a problem in the console formatter that caused command lines
2055
read from a command input file to be copied into a script output file
2056
twice.
2057
2058
<li>Fixed a problem in the Dictionary class that caused dynamic
2059
vocabulary to be forgotten if you saved a game to a file, ended the
2060
interpreter session, started a new interpreter session, restored the
2061
file saved earlier, saved again to a second file, and then later
2062
restored the second file.  (The problem was that the Dictionary object
2063
was not being marked as being in need of being saved again after it
2064
was restored in the new session, so the second save didn't include the
2065
dynamic vocabulary entries.  The Dictionary object is now properly
2066
marked as being in need of saving after being restored.)
2067
2068
<li>Fixed a problem that caused the Object.propDefined() method
2069
to yield incorrect results when called on an intrinsic class object
2070
to retrieve information on methods added to the intrinsic class
2071
with 'modify'.  The information returned was inconsistent with
2072
that returned from getPropList().  This has been corrected;
2073
the returned information should now be fully consistent.
2074
2075
<li>Fixed a problem that caused sporadic crashes in the Windows
2076
debugger when an expression including the '&amp;' operator applied
2077
to an undefined symbol was evaluated interactively.  This crashiness
2078
should no longer occur.
2079
2080
<li>Fixed two problems in the text-only interpreters relating to
2081
"&amp;" entities.  First, a few valid entity names were not
2082
recognized at all, causing the interpreter to show the entity
2083
source text (i.e., the "&amp;" code itself).  Second, entities
2084
whose names weren't properly terminated (with a semicolon, ";")
2085
had the last letter of their name incorrectly added to the display
2086
after the entity itself.  These problems have been corrected.
2087
2088
<li>Fixed a couple of bugs that caused interpreter crashes when
2089
running with "unicodeb" or "unicodel" character set mappings.
2090
2091
<li>The versions of the interpreters that run in a Windows command
2092
prompt window now correctly remove the console window's scrollbars in
2093
all cases on Windows NT, 2000, and XP.  In the past, the interpreters
2094
<i>usually</i> did this, but in some cases missed the scrollbars and
2095
left them intact.  (Console scrollbars appear when the console
2096
properties are set so that the console has a "screen buffer" larger
2097
than the actual console window.  This feature isn't available on the
2098
Windows 9x platforms, only on the NT branch, which includes 2000 and
2099
XP.)  Leaving the scrollbars active created the confusing situation
2100
that the area of the console containing the interpreter window could
2101
be scrolled off the screen.  The scrollbars are now correctly removed
2102
under all conditions.  This affects t3run.exe and tr32.exe.
2103
2104
2105
</ul>
2106
2107
<!------------------------------------------------------------------------>
2108
<h3>Changes for 3.0.6f (3/23/2003)</h3>
2109
2110
<ul>
2111
2112
<li>Fixed a problem in the regular expression parser that misinterpreted
2113
character class expressions involving single Unicode characters outside
2114
of the plain ASCII range (for example: '&lt;\u2019|\u201D&gt;').  The
2115
regular expression compiler treated such expressions as invalid; it
2116
now handles them correctly.
2117
2118
<li>Added a couple of new compiler options to allow more control over
2119
special system paths:
2120
2121
<ul>
2122
  <li><tt>-FI <i>path</i></tt>: overrides the standard system include
2123
directory with the given path.  The compiler normally uses a path that
2124
depends on the operating system and installation configuration.  Note
2125
that this option doesn't set up a search list the way -I does; there's
2126
only a single system include directory in effect at any given time.
2127
2128
  <li><tt>-FL <i>path</i></tt>: overrides the standard system library
2129
source directory with the given path.  The standard library path depends
2130
on the operating system and installation configuration.  As with -FI,
2131
there's only a single system library directory in effect at one time.
2132
</ul>
2133
2134
</ul>
2135
2136
<!------------------------------------------------------------------------>
2137
<h3>Changes for 3.0.6e (3/16/2003)</h3>
2138
2139
<ul>
2140
2141
<li>A new HTML tag is now recognized: &lt;NOLOG&gt;.  This is a
2142
container tag (so each &lt;NOLOG&gt; must have a corresponding
2143
&lt;/NOLOG&gt; tag); it delimits text that is to be displayed only
2144
on the interactive console, not in any log file (transcript) being
2145
made.  The tag has no effect on the display.
2146
2147
<li>The getPropList() method previously only returned static methods
2148
when called on intrinsic class objects (such as TadsObject or
2149
BigNumber).  This has been changed so that the method now returns both
2150
static and non-static methods.  This change clarifies the meaning of
2151
getPropList() when called on an intrinsic class object: the method
2152
returns the full set of properties that the class defines for
2153
<b>instances</b> of the intrinsic class, which may not necessarily be
2154
methods that are meaningful when called on the intrinsic class object
2155
itself.  This change is necessary for consistency throughout the
2156
class hierarchy for the reflection mechanism, so that a program can
2157
traverse a class tree to create an exhaustive list of properties on
2158
a class, including those inherited from intrinsic superclasses.
2159
2160
<li>In the output formatter, the effects of the "\^" and "\v"
2161
sequences are now limited to the plain text outside of HTML markups.
2162
In the past, if an HTML tag or entity appeared after a "\^" or "\v"
2163
sequence and before any alphabetic character, the case conversion
2164
effect was applied to the first character of the tag or entity name.
2165
Entity names are case-sensitive, so this had the potential to
2166
invalidate an entity name; in addition, whether a tag or entity name
2167
interceded, the case conversion effect was effectively lost, since it
2168
was misapplied to the HTML markup.  Now, with this output formatter
2169
change, the case conversion effect of "\^" and "\v" sequences skips
2170
past any HTML markups, so the case conversion is applied to the next
2171
plain text.
2172
2173
<li>Fixed a problem in the console output formatter that caused
2174
explicit blank line sequences to be ignored in some cases immediately
2175
after reading input.
2176
2177
<li>Fixed a compiler problem that caused spurious syntax errors in any
2178
object definition that used a template in which a list element
2179
followed a single-quoted string element.
2180
2181
<li>Fixed a compiler bug that caused spurious syntax error reports
2182
in certain cases involving multi-line strings as macro arguments.
2183
If code involving a macro spanned multiple lines, and the macro
2184
arguments included a string spanning multiple lines, and the string
2185
was part of a larger expression that started with a non-string token,
2186
the compiler sometimes misinterpreted the string as ending before its
2187
actual terminating quote.  This resulted in spurious syntax errors,
2188
as the compiler thought some of the string's continuation lines were 
2189
non-string tokens.  This has been corrected.
2190
2191
<li>Fixed a bug in the console output formatter that allowed too many
2192
lines to be displayed between "MORE" prompts in some cases, which
2193
caused text to scroll off the top of the screen before the player
2194
could read it.  (The problem was introduced with the typographical
2195
spaces in 3.0.6b.)
2196
2197
</ul>
2198
2199
<!------------------------------------------------------------------------>
2200
<h3>Changes for 3.0.6d (2/23/2003)</h3>
2201
2202
<ul>
2203
2204
<li>Fixed a problem that caused the debugger to crash when attempting
2205
to stop a running game when the game was suspended in the debugger at
2206
a run-time exception that was thrown from within a callback invoked
2207
from a system intrinsic method (for example, from a callback
2208
invoked by the List.forEach() method).  This has been corrected.
2209
2210
<li>The inputKey() intrinsic function didn't return the correct
2211
square-bracket code for special keys (arrow keys, function keys, and
2212
so on) due to a bug introduced in an earlier patch release (3.0.6a).
2213
This is now fixed.
2214
2215
<li>Fixed a problem in several methods of the Dictionary intrinsic
2216
class (addWord, removeWord, forEachWord) that sometimes caused stack
2217
overflows when calling these methods.  Fixed the same problem in some
2218
File methods (setCharacterSet, closeFile, setPos, setPosEnd).
2219
2220
</ul>
2221
2222
2223
<!------------------------------------------------------------------------>
2224
<h3>Changes for 3.0.6c (2/1/2003)</h3>
2225
2226
<ul>
2227
2228
<li>Defining a template for an object class no longer creates an
2229
external reference to the object, so it's now legal to define
2230
templates for objects that are never defined in any of the
2231
modules linked into a program.  In the past, merely defining a
2232
template for an object created a reference to the object.  This
2233
change makes it easier to create more modular subsystems whose
2234
components can be linked a la carte, since templates included in
2235
a header for the subsystem won't by themselves drag in the modules
2236
where the template objects are defined.  An object mentioned in
2237
a template will now be required at link time only if the template
2238
is actually used to create instances of the mentioned object.
2239
2240
<li>The 'modify grammar' statement now accepts an empty grammar rule
2241
list to indicate that the rules defined in the base grammar
2242
definition are to be retained.  This change makes it possible to
2243
modify the properties and/or methods of a grammar rule in isolation,
2244
without changing the syntax for the rule.  In the past, to modify
2245
only properties or methods of a grammar rule, it was necessary to
2246
repeat the entire rule list from the base grammar definition, since
2247
the rule list in the 'modify grammar' statement always superseded the
2248
base object's rule list.
2249
2250
<li>The firstObj/nextObj object iteration functions now filter out
2251
"intrinsic class modifier" objects.  These are purely internal
2252
implementation objects in the VM; they serve as the repositories of
2253
properties and methods attached via the "modify" keyword to intrinsic
2254
classes, and are for all intents and purposes parts of the intrinsic
2255
classes they modify.  There is no benefit in enumerating them as
2256
separate objects, and doing so created some confusing special cases
2257
for code using the reflection mechanisms, so they've been eliminated
2258
from the firstObj/nextObj results.
2259
2260
<li>The "intrinsic class" declaration syntax now allows the superclass
2261
of the intrinsic class to be specified.  This information is largely
2262
for documentary purposes; intrinsic classes are built into the VM, so
2263
the "intrinsic class" syntax doesn't actually define intrinsic classes
2264
but merely tells the compiler about the interfaces of the intrinsic
2265
classes being used.  The system header files have been changed to take
2266
advantage of this new feature to provide superclass information for
2267
the intrinsic classes they declare.  The one immediate effect of this
2268
change is that the compiler is now able to enforce the rule against
2269
using "modify" with intrinsic methods of intrinsic classes, and can
2270
do so for the entire inheritance tree; in the past, the compiler was
2271
unable to enforce this rule for inherited intrinsic methods, since it
2272
didn't have information on the inheritance relationships among
2273
intrinsic classes.
2274
2275
<li>Workbench for Windows had a problem that, under certain
2276
circumstances, caused the same directory to be added to the "include"
2277
path in the build settings every time a project was opened.  This
2278
happened when a file in the "include files" section of the project
2279
had a parent-relative path (a path starting with "..").  This should
2280
no longer occur.
2281
2282
<li>Workbench for Windows had a problem that failed to recognize the
2283
library-relative path of a header file associated with a nested
2284
library (that is, a library referenced from within another library;
2285
for example, en_us.tl is nested within adv3.tl in the standard library
2286
configuration).  This sometimes caused such header files to be listed
2287
in the "include files" section of the project window with absolute or
2288
parent-relative paths, when they should have been listed without any
2289
path prefix, since Workbench automatically looks for header files in
2290
the directories associated with libraries included in the build.
2291
The unnecessary path prefixes caused other undesirable side effects,
2292
such as including superfluous include paths in the build settings.
2293
Workbench should now correctly identify headers associated with nested
2294
libraries.
2295
2296
<li>Workbench for Windows did not properly initialize the "recent
2297
projects" menu when configured to load the most recent game at
2298
startup.  On the initial load at startup, the list of recent projects
2299
was always shown with full, absolute directory paths, rather than with
2300
paths relative to the initially loaded project's directory.  (This was
2301
purely cosmetic, but was inconsistent, since the recent projects were
2302
always shown with paths relative to the active project after opening
2303
another project subsequently.)  This has been corrected.
2304
2305
<li>A problem in the command-line option parser prevented some
2306
combined TADS 2/3 interpreters from accepting the "-cs" (character
2307
set) option for TADS 3 games.  This is now fixed.
2308
2309
</ul>
2310
2311
2312
<!------------------------------------------------------------------------>
2313
<h3>Changes for 3.0.6b (12/15/2002)</h3>
2314
2315
<ul>
2316
2317
<li>This version substantially overhauls the output formatter's
2318
word-wrapping rules.  The changes are designed to give the game much
2319
greater control over the way that text lines are wrapped to fit the
2320
available horizontal space.  The changes should be relatively
2321
transparent to existing code, because the new features mostly add
2322
optional new controls, but use defaults that provide roughly the old
2323
TADS 2 behavior.  The changes are implemented in both the text-only
2324
and HTML interpreters.  The new text-wrapping rules are described in
2325
detail in the <a href="sysman/fmt.htm">Formatting</a> documentation, but
2326
here's a summary of the changes:
2327
2328
<ul>
2329
2330
  <li>The game can switch at any between "word-wrap" and "character-wrap"
2331
  modes.  In word-wrap mode, text can be broken only at word boundaries;
2332
  in character-wrap mode, text can be broken between almost any two
2333
  characters.  The modes are selected with the new tag &lt;WRAP&gt;:
2334
  &lt;WRAP WORD&gt; sets word-wrap mode, and &lt;WRAP CHAR&gt;
2335
  sets character-wrap mode.
2336
2337
  <li>The formatter recognizes the Unicode character \uFEFF (HTML
2338
  entity "&amp;zwnbsp;"), the zero-width non-breaking space.  This character
2339
  doesn't show up on the display, but it tells the formatter not to break
2340
  the line between the two adjacent characters, even if the text-wrapping
2341
  rules would otherwise permit it.
2342
2343
  <li>The formatter recognizes the Unicode character \u200B
2344
  ("&amp;zwsp;"), the zero-width space.  This character doesn't show
2345
  up on the display, but it tells the formatter that it can break the
2346
  line between the two adjacent characters, even if the wrapping rules
2347
  wouldn't ordinarily allow a line break there.
2348
2349
  <li>The formatter recognizes several of the Unicode special-width
2350
  space characters (en space, em space, etc).  All of these are treated
2351
  as quoted space, in that they don't combine with adjacent runs of
2352
  ordinary whitespace.  These spaces allow finer control over visual
2353
  spacing, which facilitates a more typographical appearance in the
2354
  HTML interpreters.
2355
2356
  <li>The "soft hyphen" character, \u00AD (HTML "&amp;shy;") is now
2357
  accepted by the formatter.  This is invisible in most cases, but
2358
  it tells the formatter that it can break the line by hyphenating.
2359
  If the formatter does break a line at a soft hyphen, it displays
2360
  the soft hyphen as an ordinary visible hyphen.
2361
2362
</ul>
2363
2364
<li>Added the new "log file console."  This is a special kind of
2365
console object that has no display, but simply captures all of its
2366
output to a log file.  This can be used to capture game output to a
2367
file, using the standard output formatting (including HTML
2368
interpretation and word wrapping), without displaying anything to the
2369
player.  Refer to the <a href="sysman/tadsio.htm">tads-io function set
2370
documentation</a> for details.
2371
2372
</ul>
2373
2374
2375
<!------------------------------------------------------------------------>
2376
<h3>Changes for 3.0.6a (11/23/2002)</h3>
2377
2378
<ul>
2379
2380
<li>The new <tt>#pragma newline_spacing(on|off)</tt> directive lets
2381
the program control the treatment of newlines in strings.  By default,
2382
newline spacing is set to "on": when a newline character is found within
2383
a string, the compiler converts the newline plus any whitespace that
2384
immediately follows to a single space character.  When newline spacing
2385
is set to "off", the compiler instead simply strips out the newline
2386
and any immediately following whitespace.  Setting newline spacing
2387
to "off" is desirable in some languages, such as Chinese, where
2388
whitespace is not conventionally used as a token separator in
2389
ordinary text; turning off newline spacing can make it easier to
2390
write code in these cases, because it allows strings to be split over
2391
several lines without introducing unwanted whitespace.
2392
2393
<li>The compiler now allows macro substitutions in library (.tl) files.
2394
In a library file, the value of a preprocessor symbol defined with the
2395
-D option can be substituted into the text of the library file using
2396
the notation "$(VARNAME)": the variable name is enclosed in parentheses
2397
preceded by a dollar sign.  The adv3 library (adv3.tl) uses this
2398
capability to parameterize the language-specific library and message
2399
file selection.  See <a href="sysman/build.htm">Compiling and Linking</a>
2400
for more information.
2401
2402
<li>The text-only interpreters now treat "&amp;nbsp;" as a true non-breaking
2403
space.  (In the past, "&amp;nbsp;" was treated the same as "\ ", the
2404
quoted space: the formatter did not combine such a space with other
2405
adjacent whitespace, or remove it from the start of a line, but <i>did</i>
2406
allow a line break to occur at an "&amp;nbsp;" character.)
2407
2408
<li>On Workbench for Windows, the Build Settings dialog has a new page
2409
that lets you set the directory paths to use for object files and symbol
2410
files.  This new page's tab is labeled "Temp Files," as the symbol and
2411
object files are intermediate files that the compiler produces and
2412
reads during compilation.  (These settings correspond to the -Fy and -Fs
2413
compiler options.)
2414
2415
<li>When Workbench for Windows creates a new project, it automatically
2416
creates a subfolder (of the folder containing the project file) to
2417
store the project's object and symbol files.  The new subfolder is
2418
called "obj".  Workbench initializes the new project's object file and
2419
source file path options to the new subfolder.  The purpose of using
2420
the subfolder is to keep the compiler-generated intermediate
2421
files separate from the project's source files, to make it easier to
2422
manage the files associated with the project.
2423
2424
<li>A portability bug that caused interpreter crashes on some platforms
2425
(notably Solaris) has been fixed.  (This bug only occurred when the
2426
interpreter was compiled with certain C++ compilers, and prevented
2427
the interpreter from running any games.)
2428
2429
<li>The 'inherited' operator did not work properly to inherit a
2430
modified intrinsic class method from the intrinsic base class of a
2431
modified intrinsic class.  For example, if a method defined with
2432
"modify TadsObject" used 'inherited' to inherit, and a method of the
2433
same name was defined with "modify Object", the Object modifier method
2434
was not properly inherited.  This has been corrected.
2435
2436
<li>The new compiler option "-errnum" causes the compiler to display
2437
the numeric error code for each warning or error message.  By default,
2438
the compiler does not display the numeric codes for errors, because
2439
the code is mostly for the compiler's own use; however, the new option
2440
allows the user to show these codes if desired, for purposes such as
2441
cross-referencing with documentation.
2442
2443
<li>The new compiler option "-w-<i>nnn</i>" causes the compiler to
2444
suppress the warning message identified by <i>nnn</i>, which is the
2445
compiler's internal numeric code for the warning.  When this option is
2446
used, the compiler will not display any warnings of the given type,
2447
and will not include any such warnings in its summary error count.
2448
This option can be repeated to suppress multiple types of warning
2449
messages.  Only warnings (and pedantic warnings) can be disabled with
2450
this option; specifying codes for errors of severity greater than
2451
warnings will have no effect.  The complementary option
2452
"-w+<i>nnn</i>" can be used to explicitly enable a warning; by
2453
default, all warnings are enabled, so the only reason this option
2454
would be needed is to enable a warning previously removed with
2455
"-w-<i>nnn</i>" on the same command line, which might sometimes be
2456
useful with shell aliases or command scripts.  Note also that the
2457
"-w+<i>nnn</i>" option <b>cannot</b> be used to selectively enable
2458
certain pedantic warnings without enabling pedantic mode; pedantic
2459
warnings are an entirely separate class of messages from regular
2460
warning, and can only be enabled as a group using the "-w2" option.
2461
Once pedantic warnings are generally enabled, you can use
2462
"-w-<i>nnn</i>" to disable specific pedantic warnings you wish to
2463
suppress.  + <li>When searching for an external resource file (.3r0,
2464
.3r1, etc.), the interpreter now looks for a file with both a
2465
lower-case and upper-case version of each suffix.  This is intended to
2466
make the naming convention more flexible on case-sensitive file
2467
systems, such as Unix; on systems with case-insensitive file naming,
2468
such as Windows or Mac, this change has no effect.
2469
2470
<li>Added support for mixed multi-byte character sets to the character
2471
mapper; this allows the compiler to read source files encoded in
2472
multi-byte character sets, and allows the interpreters to use local
2473
system character sets with multi-byte encodings, both for displaying
2474
text on the screen and reading text from the keyboard.  A number of
2475
widely-used character sets for Asian languages use this type of
2476
character set (Windows systems localized for Chinese and Japanese use
2477
multi-byte character sets, for example).  Such character sets have
2478
always been supported in the character map compiler (mkchrtab), but
2479
the character mapper used in the compiler and VM did not implement the
2480
mapping logic for these types of character sets.  Double-byte
2481
character sets are now fully supported; the character mapper can now
2482
handle any character set that uses two-byte sequences for all of its
2483
characters (usually called double-byte character sets), or that uses a
2484
mixture of one-byte and two-byte sequences (usually known as
2485
multi-byte or mixed-multi-byte character sets).
2486
2487
<li>In Workbench for Windows, the Debug Log window displayed its
2488
contents using the same color settings as in the main game window.
2489
The Debug Log window now uses the color settings from the Workbench
2490
"options" dialog, the same as source file windows.
2491
2492
<li>In the Build Settings dialog in Workbench for Windows, on the
2493
Installer page, a new field allows overriding the default character
2494
mapping library (cmaplib.t3r) with a custom mapping library.  This
2495
is especially useful for authors working in Asian languages; the
2496
default character map library includes mappings for the common
2497
character sets for most European languages, but does not include
2498
the Asian character sets because of the large size of these sets.
2499
Authors working in languages which require character sets not included
2500
in the default mapping library can create their own mapping file or
2501
files (see the <a href="sysman/charmap.htm">character mapping documentation</a>),
2502
then bundle the file(s) into a custom library (a .t3r file) using
2503
the <tt>t3res</tt> tool.  Specify this .t3r file in the new
2504
Character Map Library field, and the installer will automatically
2505
bundle this file into your game's executable file when building
2506
the install set.
2507
2508
<li>Fixed a problem in Workbench for Windows that caused Workbench to
2509
reload a library (.tl) file every time Workbench became the foreground
2510
application (i.e., its main window was activated after another
2511
application had been in the foreground), if the library was ever
2512
modified after being loaded in Workbench in that session.
2513
2514
<li>Fixed a problem in the UTF-8 character mapper that could have
2515
caused problems in rare cases when reading from a text file encoded
2516
in UTF-8.  The mapper did not correctly figure the byte length of the last
2517
character when reading a three-byte character at the end of the buffer and
2518
the first two of the three bytes was read into the buffer.  (This problem
2519
was extremely unlikely to actually occur in practice, but in any case it's
2520
now fixed.)
2521
2522
<li>Fixed a problem in the GrammarProd class that caused interpreter
2523
crashes under certain circumstances.  In particular, if a grammar rule
2524
was matched with a '*' element in the rule, and the matched input string
2525
had exactly six tokens, an internal memory corruption led to an interpreter
2526
crash.  This has been corrected.
2527
2528
<li>Fixed the t3make error message "error creating image file" to properly
2529
show the image file name as part of the message.  This message incorrectly
2530
showed the filename as "s", regardless of the actual name of the image.
2531
2532
<li>Fixed a problem in the DOS character-mode interpreters (t3run and
2533
tr32) that caused start-up error messages (in particular, errors
2534
relating to loading the .t3 file, such as a "game file not found"
2535
error) to be cleared from the display before the user had a chance to
2536
see them.
2537
2538
</ul>
2539
2540
2541
<!------------------------------------------------------------------------>
2542
<h3>Changes for 3.0.5 (09/22/2002)</h3>
2543
2544
<ul>
2545
2546
<li>The &lt;BANNER&gt; tag is no longer allowed for T3 HTML programs.
2547
T3 games should use the banner API instead.  (The &lt;BANNER&gt;
2548
tag has been removed entirely because it interacts poorly with
2549
the banner API.  The adv3 library uses the banner API for the
2550
status line, so this essentially forces programs using the library
2551
to do likewise.  To reduce the potential for any confusion that
2552
could result from games inadvertantly mixing banner API calls and
2553
banner tags, we simply disallow banner tags entirely, to ensure
2554
that all T3 programs use the banner API uniformly.)  For the moment,
2555
&lt;BANNER&gt; tags are actually disallowed only when the banner API
2556
is supported by an HTML interpreter; for HTML interpreters that don't
2557
yet support the banner API, the tags are still allowed.  This support
2558
will be withdrawn soon, though; we're just waiting until we're sure
2559
that banner API support is available on all HTML interpreters.
2560
2561
<li>The compiler now assumes that each filename and folder name
2562
specified in a ".t3m" file (a compiler makefile) is given relative to
2563
the folder location of the .t3m file itself.  This makes the compiler
2564
essentially independent of the working directory when using a .t3m
2565
file, because the location of the .t3m file effectively becomes the
2566
working directory for any file and folder paths specified within.
2567
This treatment naturally does not apply to any filename given in a
2568
.t3m file with an absolute path (for example, a Unix path that starts
2569
with "/", an MS-DOS path that starts with "\" or a drive letter, or a
2570
Macintosh path that starts with a volume name), since an absolute path
2571
is already independent of the working directory.
2572
2573
<li>The compiler now keeps information on the compiler version that
2574
was used to compile a module.  The compiler checks this information
2575
and automatically rebuilds a module that was built by an older version
2576
of the compiler.  This ensures that all components of a program are
2577
rebuilt whenever a new version of the compiler is installed.  (In the
2578
past, the compiler did not consider itself to be a dependency of the
2579
derived files, which occasionally led to confusing link-time errors
2580
caused by mismatched object file information.)
2581
2582
</ul>
2583
2584
2585
<!------------------------------------------------------------------------>
2586
<h3>Changes for 3.0.5h (09/14/2002)</h3>
2587
2588
<ul>
2589
2590
<li>Some slight additional performance optimizations in the VM should
2591
improve execution speed by another 10% or so (vs. release 3.0.5g).
2592
2593
<li>Fixed a problem in the Dictionary class that caused spurious
2594
run-time error when restoring games (particularly when restoring
2595
after a RESTART operation had been previously performed).
2596
2597
<li>Fixed a problem in the regular expression parser: the
2598
counted-repeat operator ({n,m}) did not nest properly with closures.
2599
2600
<li>Fixed a debugger problem that caused the debugger to fail to
2601
take control (i.e., pause the game program and enter the debugger UI)
2602
when a run-time error occurred under certain conditions when using
2603
the "Step Out" or "Step Over" commands.
2604
2605
<li>Fixed a problem in the console-based text-only interpreters that
2606
caused the [More] prompt to be displayed at the wrong place (at the
2607
end of a line of text, rather than at the beginning) under certain
2608
rare conditions.
2609
2610
</ul>
2611
2612
2613
<!------------------------------------------------------------------------>
2614
<h3>Changes for 3.0.5g (09/08/2002)</h3>
2615
2616
<ul>
2617
2618
<li>The <a href="sysman/dict.htm">Dictionary</a> intrinsic class has been
2619
substantially altered.  The central change is that the caller can now
2620
specify a "comparator" object that defines how strings in the
2621
dictionary are compared to input strings; this allows the game to
2622
customize the rules for looking up dictionary words.  Related to this,
2623
all methods related to truncation length have been removed; instead,
2624
truncation, if desired, is now handled through the comparator.
2625
Finally, the methods that look up words in the dictionary (findWord
2626
and isWordDefined) have changed slightly to provide additional
2627
information from the comparator about how an input word matches a
2628
dictionary word.
2629
2630
<li>Added the <a href="sysman/strcomp.htm">StringComparator</a> intrinsic
2631
class.  This class works with the <a href="sysman/dict.htm">Dictionary</a>
2632
intrinsic class to specify customized rules for matching input words
2633
to dictionary words.  StringComparator provides options that specify
2634
whether or not upper- and lower-case letters are distinguished;
2635
whether words can be truncated (abbreviated) on input, and to what
2636
minimum length; and a set of equivalence mappings that allow
2637
alternative spellings on input, such as using unaccented equivalents
2638
of accented characters.
2639
2640
<li>The <a href="sysman/gramprod.htm">GrammarProd</a> intrinsic class method
2641
parseTokens() now uses the supplied Dictionary to perform comparisons
2642
to literal tokens.  Each input token is compared to literal tokens in
2643
the grammar rules using the Dictionary's current comparator.  Literal
2644
tokens in grammar rules thus are matched using the same rules as
2645
dictionary words.  The matchValues() results are stored in the
2646
match tree objects in the new property tokenMatchList: this property
2647
is set in each object in the match tree, and contains a list of
2648
the matchValues() results corresponding to the token list elements.
2649
2650
</ul>
2651
2652
<!------------------------------------------------------------------------>
2653
<h3>Changes for 3.0.5f (09/02/2002)</h3>
2654
2655
<ul>
2656
2657
<li>Added the new method findReplace() to the <a
2658
href="sysman/string.htm">String</a> intrinsic class.  This new method is
2659
similar to the <a href="sysman/tadsgen.htm">rexReplace()</a>
2660
function, but is slightly more efficient for situations where the text
2661
to be replaced is a simple constant string rather than a regular
2662
expression pattern.  It's also slightly simpler to use, since it's not
2663
necessary to worry about any special regular expression interpretation
2664
of the search string.
2665
2666
<li>Added the new intrinsic class <a
2667
href="sysman/rexpat.htm">RexPattern</a>.  This new class encapsulates a
2668
"compiled" regular expression pattern, which can be used in place of a
2669
pattern string in the regular expression functions.  Compiling an
2670
expression converts it from a string into an internal representation.
2671
When a particular pattern is used repeatedly in many searches, it's
2672
much more efficient to use a RexPattern object to conduct searches
2673
with the pattern, because the regular expression functions have to
2674
compile their search patterns internally anyway; by using a
2675
RexPattern, you perform the compilation for a particular pattern only
2676
once, in advance, rather than each time you use the pattern.
2677
Compilation takes a non-trivial amount of time, so if a pattern is
2678
used frequently, pre-compiling it to a RexPattern can make a
2679
difference in execution performance.
2680
2681
</ul>
2682
2683
<!------------------------------------------------------------------------>
2684
<h3>Changes for 3.0.5e (08/25/2002)</h3>
2685
2686
<ul>
2687
2688
<li>This release has a number of VM, compiler, and intrinsic class
2689
changes intended to make programs run faster.  The compiler now
2690
generates more optimized code (especially when compiling with no debug
2691
information), and VM executes code faster.  The changes should be
2692
entirely transparent in terms of functionality, although a few new
2693
VM instructions have been added, so code compiled with this new
2694
version of the compiler will not run with older VM versions.
2695
2696
<li>Added two new <a href="sysman/lookup.htm">LookupTable</a> methods:
2697
keysToList(), which returns a list consisting of all of the keys
2698
in the table; and valsToList(), which returns a list consisting of
2699
all of the values in the table.  In both cases, the lists are in
2700
arbitrary order.
2701
2702
<li>The compiler left out a final newline after the error/warning
2703
count summary at the end of a compilation that generated error or
2704
warning messages.  This is now fixed.
2705
2706
<li>Fixed a couple of dialog messages in Workbench for Windows that
2707
referred to ".t3x" files (the old version of the ".t3" extension).
2708
2709
<li>Fixed a problem in Workbench for Windows that caused an
2710
unparseable compiler command line to be generated if an option
2711
argument (such as an Include path) ended with a backslash.  The
2712
problem had to do with DOS's odd command-line quoting rules; the
2713
trailing backslash was treated as "quoting" the quote mark at the end
2714
of the option argument.  This has been corrected.
2715
2716
<li>The compiler's command line error diagnostics are now somewhat
2717
improved, to help pinpoint the source of an error.  In the past, the
2718
compiler always simply showed its usage message if the command line had
2719
a problem, which didn't help much in identifying which argument was
2720
causing the problem.  The compiler now shows the usage message only
2721
when the command line is empty (or when the argument "-help" is given);
2722
in case of error, the compiler now shows a message explaining the
2723
specific problem, and shows the particular option causing the problem
2724
if appropriate.
2725
2726
<li>In Workbench for Windows, the folder selector dialog was started
2727
with an empty current folder, which made the entire dialog appear
2728
empty, in some cases (such as when adding a directory to the "Include"
2729
list in the Build Settings dialog).  The dialog should now always
2730
start with a valid initial directory.
2731
2732
</ul>
2733
2734
<!------------------------------------------------------------------------>
2735
<h3>Changes for 3.0.5d (08/04/2002)</h3>
2736
2737
<ul>
2738
2739
<li>Workbench for Windows now has a primitive but usable "profiling"
2740
feature.  Profiling is a technique in which the programmer collects
2741
data on where the running program is spending its time.  The purpose
2742
is to identify any areas where the program spends a disproportionate
2743
amount of time; this sometimes reveals obvious bottlenecks where the
2744
code can be sped up with simple improvements, and in any case usually
2745
reveals the areas where optimization efforts will yield the greatest
2746
results.  Workbench collects profiling data with function/method
2747
granularity: each time the program enters or exits a function or
2748
method, Workbench can track the time spent in that code.  The user can
2749
turn profiling on and off using the new "Profiler" menu; when
2750
profiling is turned on, Workbench collects profiling data until the
2751
profiler is turned off, at which point the system asks for a file to
2752
which to write the collected data.  Workbench writes the data as a
2753
tab-delimited text file: the first column is the name of the function
2754
or method; the second is the number of microseconds spent
2755
<b>directly</b> in that code; the third is the number of microseconds
2756
spent in functions or methods <b>called by</b> that code (which
2757
excludes the time spent directly in the code itself); and the fourth
2758
is the number of times the function or method was invoked.  This
2759
format can be easily loaded into an external analysis tool (such as a
2760
spreadsheet application) for inspection.  (The profiling facility is
2761
designed mostly for use by library authors, so we probably won't
2762
go to great lengths in the area of ease of use; and we don't expect
2763
to build any integrated analysis tools, as a spreadsheet is more
2764
than adequate to analyze the data.)
2765
2766
<li>Fixed some problems in the DOS interpreter's display management
2767
(these are generic character-mode interpreter fixes that will also
2768
take care of the same problems on Unix and other character-mode
2769
systems).  The problems affected resizing the terminal window,
2770
interaction with "More" prompts in some situations, and cursor
2771
placement under certain conditions.  In addition, the "review mode"
2772
status bar is back (it was missing from the first versions with the
2773
banner API); note, though, that the mode bar is now displayed at the
2774
top of the main game window rather than taking over the status line,
2775
which is necessary because of the possibility the banner API creates
2776
of non-standard status line layouts.
2777
2778
<li>Fixed a problem in the VM that could conceivably have caused
2779
crashes or other misbehavior under certain extremely improbable
2780
conditions involving stack overflows.
2781
2782
</ul>
2783
2784
2785
<!------------------------------------------------------------------------>
2786
<h3>Changes for 3.0.5c (07/28/2002)</h3>
2787
2788
<ul>
2789
2790
<li>The banner creation function bannerCreate() has a slightly modified
2791
interface.  The new interface allows the initial size of the banner to
2792
be set in terms of the natural sizing units of the window; in addition,
2793
percentage-based sizing is still possible as well.
2794
2795
<li>Percentage-based banner sizing now behaves slightly differently
2796
than it used to.  In the past, the percentage size was based on the size
2797
of the complete application window.  The percentage size is now based
2798
instead on the "remaining space" at the point at which a banner is
2799
laid out during the screen layout process.
2800
2801
<li>The new banner function bannerSetSize() complements
2802
bannerSizeToContents() by adding the ability to set a banner's
2803
size in terms of the natural sizing units of the window or a new
2804
percentage-based size.
2805
2806
</ul>
2807
2808
2809
<!------------------------------------------------------------------------>
2810
<h3>Changes for 3.0.5b (07/20/2002)</h3>
2811
2812
<ul>
2813
2814
<li>Fixed a bug in the interpreter that caused sporadic crashes in
2815
situations involving adding lots of new properties to an object (of
2816
class TadsObject).
2817
2818
</ul>
2819
2820
<!------------------------------------------------------------------------>
2821
<h3>Changes for 3.0.5a (07/14/2002)</h3>
2822
2823
<ul>
2824
2825
<li>A new set of functions, collectively called the
2826
<a href="sysman/banners.htm">banner API</a>, provides more direct programmatic
2827
control over the appearance of the user interface than was available
2828
in past versions of TADS.  The new API allows the program to divide
2829
the display into multiple "banners," which are non-overlapping windows,
2830
each with its own independent output stream.  The banner API provides
2831
functionality based on the HTML TADS &lt;BANNER&gt; tag, but offers
2832
more power, and is also supported on many text-only interpreters.
2833
2834
<li>Any time a nested object is defined, the compiler now automatically
2835
defines the property <tt>lexicalParent</tt> in the nested object, setting
2836
the property to a reference to the lexically enclosing object.
2837
2838
<li>The main text window's output stream is now <b>always</b> in HTML mode.
2839
The "\{" and "\}" sequences have likewise been removed, since these
2840
are no longer useful now that HTML mode cannot be switched on and off.
2841
2842
<li>The "\H+" and "\H-" output control sequences have been removed.
2843
These are no longer useful now that HTML mode switching has been removed.
2844
2845
<li>The "\(" and "\)" output control sequences have been removed.
2846
The HTML markups &lt;B&gt; and &lt;/B&gt; should be used instead.
2847
The "\(" and "\)" sequences are now redundant with the HTML &lt;B&gt;
2848
markup, since text output streams are now always in HTML mode.
2849
2850
<li>A new system information code, SysInfoInterpClass, retrieves
2851
information on the broad "class" of the interpreter.  This returns
2852
one of the following:
2853
2854
  <ul>
2855
  <li>SysInfoIClassText: a text-only character-mode interpreter, such as
2856
      MS-DOS TADS or Unix TADS.  This type of interpreter uses a single
2857
      fixed-pitch font to show all text, cannot show any graphics, and
2858
      uses the text-only HTML subset.
2859
  <li>SysInfoIClassTextGUI: a text-only interpreter running on a graphical
2860
      platform, such as MacTADS or WinTADS.  This type of interpreter
2861
      might use proportionally-spaced fonts, and might use multiple fonts.
2862
      These interpreters cannot show graphics using HTML, but they might
2863
      use some graphics of their own for things like window borders.
2864
      This type of interpreter recognizes the text-only HTML subset.
2865
      Note that this code is not indicative of the type of OS, but rather
2866
      of the type of interpreter: MS-DOS TADS <b>always</b> returns
2867
      SysInfoIClassText, even when it's running in a DOS box under
2868
      Windows, because it still acts like a character-mode interpreter
2869
      even when running on a Windows machine.
2870
  <li>SysInfoIClassHTML: a full HTML interpreter, such as HTML TADS on
2871
      Windows, or HyperTADS on Macintosh.
2872
  </ul>
2873
2874
<li>The SysInfoHtml and SysInfoHtmlMode system information codes have
2875
been eliminated.  The former is superseded by SysInfoInterpClass, and
2876
the latter has been rendered obsolete by the elimination of HTML mode
2877
switching.
2878
2879
<li>The TADS 3 character-mode interpreters now support the &lt;TAB&gt;
2880
tag, if the underlying OS code allows.  This tag is supported on all
2881
full HTML interpreters, plus most character-mode text-only platforms.
2882
The GUI text-only interpreters do not support this currently.  The
2883
full complement of &lt;TAB&gt; features is supported; see the HTML TADS
2884
documentation (specifically, the TADS-specific markup extensions) for
2885
details.
2886
2887
<li>The compiler and VM support "transient" objects, which are objects
2888
that do not participate in any of the VM's built-in persistence
2889
mechanisms (save, restore, undo, restart).  A transient object is
2890
not saved to a saved state file, and is not affected by restore, undo,
2891
or restart operations.  This is described more fully in the
2892
<a href="sysman/objdef.htm">Object Definitions</a> section of
2893
the documentation.
2894
2895
<li>The <a href="sysman/tadsgen.htm">saveGame</a> function works
2896
differently than it used to.  The function no longer saves the
2897
execution context, so it no longer has the "setjmp" behavior.
2898
2899
<li>The <a href="sysman/tadsgen.htm">restoreGame</a> function
2900
works differently as well.  Because saveGame no longer saves the
2901
execution context, restoreGame no longer restores it, so the function
2902
simply returns on successful completion - it doesn't have the
2903
"longjmp" behavior any more.  This new design is much more flexible,
2904
because it allows arbitrary session information to be retained
2905
across the Restore operation, via local variables on the stack as
2906
well as with transient objects, and gives the program complete
2907
control over execution flow throughout the operation.
2908
2909
<li>The <a href="sysman/tadsgen.htm">restartGame</a> function
2910
also has a new design.  The function no longer requires a function
2911
to jump to, but simply resets object state and returns.  As with the
2912
restoreGame changes, this allows the program complete control over
2913
execution flow and allows any amount of session information to
2914
be retained across the Restart operation.
2915
2916
<li>All instances of the <a href="sysman/file.htm">File</a> intrinsic
2917
class are now transient.  The static creation methods of the File
2918
class always return transient objects.
2919
2920
<li>It is now possible to open "resources" as though they were files,
2921
and read their data using the <a href="sysman/file.htm">File intrinsic
2922
class</a>.  Two new static construction methods make this possible:
2923
openTextResource() and openRawResource().
2924
2925
<li>The option flags for the String.htmlify() method have been renamed,
2926
to make the names of the flags more descriptive of their functions.
2927
The flags formerly were of the form HtmlifyKeepXxx, but now use names
2928
of the form HtmlifyTranslateXxx.  The change of terms to "translate"
2929
is a better match for what the flags actually mean, since the flags
2930
specify that certain characters are to be translated into HTML markup
2931
equivalents.
2932
2933
<li>In Workbench for Windows, when the status line is displayed, the
2934
messages from the compiler showing the build progress are not displayed
2935
to the debug log window, but rather to the status line.  This makes it
2936
much easier to read the results in the log window, and especially makes
2937
it easier to see the error messages, since the error messages aren't
2938
mixed in with lots of build progress messages.  When the status line
2939
is hidden, build progress messages are still shown in the log window
2940
so that the compiler's progress can be seen.
2941
2942
<li>The internal character encoding that the T3 software was using
2943
in past versions was not in conformance with the T3 specification, which
2944
calls for the standard UTF-8 encoding.  The software was using an older
2945
encoding that had been obsoleted in the spec but was never changed in
2946
the software.  This has been corrected; note that this change requires
2947
recompiling any existing games.
2948
2949
<li>Due to a bug, Workbench for Windows did not properly store directory
2950
paths (such as for the Include path list) in the project file when the
2951
paths included a colon (":") character.  This has been fixed.
2952
2953
<li>A bug in Workbench for Windows caused the Window menu to display
2954
incorrect entries for Windows 95 and NT 4 (actually, this is more due
2955
to a bug in Windows 95 and NT 4, but Workbench didn't work around the
2956
bug, so in a sense it was a Workbench bug).  This has been corrected.
2957
2958
<li>A compiler bug caused the compiler to crash (with an access
2959
violation or equivalent) when given a source file whose very first
2960
object definition started with a template containing a double-quoted
2961
string with an embedded expression.  This problem is now fixed.
2962
2963
</ul>
2964
2965
<!------------------------------------------------------------------------>
2966
<h3>Changes for version 3.0.4 - 06/01/2002</h3>
2967
2968
<ul>
2969
2970
<li>Fixed a problem in the Vector intrinsic class that caused interpreter
2971
crashes under certain circumstances.  (The exact conditions were not
2972
entirely predictable, because the problem had to do with an interaction
2973
between the Vector class, the garbage collector, and the undo mechanism,
2974
and only occurred when garbage collection was triggered after certain
2975
operations in the Vector class.)
2976
2977
<li>Added a status line to Workbench for Windows.  The status line is
2978
optional; it can be displayed or hidden, as desired, using the "View" menu.
2979
When displayed, the status line shows whether or not the program being
2980
debugged is running, and shows the line and column number of the current
2981
cursor position when a source file window is active.
2982
2983
<li>Fixed a problem in Workbench that prevented parts of the window
2984
layout from being saved in the project configuration file when the
2985
main Workbench application window was closed while the program being
2986
debugged was still running.
2987
2988
</ul>
2989
2990
2991
<!------------------------------------------------------------------------>
2992
<h3>Changes for 05/19/2002</h3>
2993
2994
<ul>
2995
2996
<li>The DOS text-mode interpreter now supports setting text colors.
2997
Text colors can be set through HTML, as follows:
2998
2999
<ul>
3000
  <li>The &lt;FONT COLOR=xxx BGCOLOR=yyy&gt; tag can be used to set the 
3001
  and background colors of the text.  The basic set of HTML colors is
3002
  recognized, although
3003
  the effective set of available colors is limited to the eight ANSI
3004
  colors that DOS character mode can display: white, black, red, green,
3005
  blue, yellow, cyan, and magenta.  Hex RGB values (for example,
3006
  &lt;FONT COLOR='#C080E0'&gt; are accepted, but these are simply
3007
  mapped to the nearest available color from the ANSI set.
3008
  Note that if a FONT tag specifies both COLOR and BGCOLOR, the text
3009
  will be displayed exactly as specified; if the FONT tag specifies
3010
  only COLOR, then the background color will be inherited from the
3011
  enclosing text, and ultimately from the &lt;BODY&gt; color if no
3012
  enclosing text has a specific background color.
3013
3014
  <li>The &lt;BODY&gt; tag can be used to set the foreground and background
3015
  color of the window.  The TEXT attribute sets the foreground text color,
3016
  and the BGCOLOR attribute sets the background color of the window.
3017
  The background color affects the entire window, just as in the
3018
  HTML interpreters, so the entire window will be redisplayed in its
3019
  new color whenever a &lt;BODY BGCOLOR=xxx&gt; tag is displayed.
3020
3021
  <li>The parameterized color names (TEXT, BGCOLOR, STATUSTEXT, STATUSBG)
3022
  are accepted and map to the current settings of those colors, as set
3023
  by the TRCOLOR program.
3024
</ul>
3025
3026
<li>The new system information code SysInfoTextColors can be used to
3027
determine the level of color support available on the platform.  The
3028
return value is a code indicating the level of support:
3029
3030
<ul>
3031
  <li>SysInfoTxcNone - no color support
3032
  <li>SysInfoTxcParam - parameterized color names only
3033
  <li>SysInfoTxcAnsiFg - The eight ANSI colors are available for text, but
3034
     there is no capability to set the background color
3035
  <li>SysInfoTxcAnsiFgBg - the ANSI colors are available for text and
3036
     background colors (this is the code the DOS interpreter returns)
3037
  <li>SysInfoTxcRGB - full RGB text color support is available (this is the
3038
     code the Windows HTML interpreter returns)
3039
</ul>
3040
3041
<li>The new system information code SysInfoTextHilite can be used to
3042
determine whether or not text highlighting is available.  This returns
3043
true if a distinctive appearance for &lt;B&gt; text is available,
3044
nil if not.  The HTML interpreters return true for this; the text-only
3045
interpreters generally return true, unless running in "plain" ASCII
3046
mode or with a terminal or display device that cannot render anything
3047
special for highlighted text.
3048
3049
</ul>
3050
3051
3052
<!------------------------------------------------------------------------>
3053
<h3>Changes for 05/05/2002</h3>
3054
3055
<ul>
3056
3057
<li>Fixed a problem in Workbench for Windows with libraries (.tl
3058
files) found via the library search path.  In some cases, the files
3059
within a library could not be opened; in addition, the library itself
3060
was not always properly scanned on opening the project, so no files
3061
within the library were visible in the Project window.  Libraries
3062
found via the search path should work properly now.
3063
3064
<li>Workbench for Windows now uses small (8x8-pixel) icons in the left
3065
margin of debugger source windows when the selected source window font
3066
is smaller than the standard (16x16-pixel) icons.  (These are the icons
3067
that show the location of the current line, breakpoints, and so on
3068
during a debugging session.)  This allows more lines to be displayed
3069
vertically in a source window when a small font is selected.
3070
3071
<li>When quitting out of Workbench, if a build is still running, the
3072
Workbench displays a dialog indicating that Workbench is waiting for
3073
the build to complete.  In the past, there was no way to force
3074
Workbench to exit if the build process had become stuck.  Now, the
3075
"waiting for build" dialog offers an "Abort" button; clicking this
3076
button will forcibly terminate the build, allowing Workbench to
3077
terminate immediately.  This button is useful when the build process
3078
becomes stuck (which ideally should never happen, but has happened
3079
at times due to compiler bugs).  The build process should not normally
3080
be aborted forcibly unless the build appears stuck, because forcibly
3081
terminating a process on Windows can occasionally cause Windows to
3082
become unstable.
3083
3084
<li>Fixed a compiler bug that made it possible for the linking step
3085
to get stuck in an infinite loop if the data associated with a particular
3086
"grammar" production became too large.  This should no longer occur.
3087
3088
<li>Fixed a debugger bug that caused sporadic crashes when running
3089
games in Workbench.
3090
3091
<li>Added new systemInfo() codes for MNG display:
3092
  <ul>
3093
    <li>SysInfoMng - can the system display MNG images?
3094
    <li>SysInfoMngTrans - can the system display MNG's with transparency?
3095
    <li>SysInfoMngAlpha - can the system display MNG's with alpha channels
3096
       (i.e., partial transparency)?
3097
  </ul>
3098
3099
</ul>
3100
3101
<!------------------------------------------------------------------------>
3102
<h3>Changes for 04/28/2002</h3>
3103
3104
<ul>
3105
3106
<li>Renamed numerous macros in the system and adv3 header files to
3107
achieve more consistency in the naming scheme.  Here's a table of
3108
the changes.  (Sorry this isn't a Perl script or something.)
3109
3110
<p><center><table>
3111
<tr><th align=left>Old Name<th align=left>New Name
3112
<tr><td>BIGNUM_SIGN<td>BignumSign
3113
<tr><td>BIGNUM_EXP<td>BignumExp
3114
<tr><td>BIGNUM_EXP_SIGN<td>BignumExpSign
3115
<tr><td>BIGNUM_LEADING_ZERO<td>BignumLeadingZero
3116
<tr><td>BIGNUM_POINT<td>BignumPoint
3117
<tr><td>BIGNUM_COMMAS<td>BignumCommas
3118
<tr><td>BIGNUM_POS_SPACE<td>BignumPosSpace
3119
<tr><td>BIGNUM_EUROSTYLE<td>BignumEuroStyle
3120
<tr><td>TYPE_NIL<td>TypeNil
3121
<tr><td>TYPE_TRUE<td>TypeTrue
3122
<tr><td>TYPE_OBJECT<td>TypeObject
3123
<tr><td>TYPE_PROP<td>TypeProp
3124
<tr><td>TYPE_INT<td>TypeInt
3125
<tr><td>TYPE_SSTRING<td>TypeSString
3126
<tr><td>TYPE_DSTRING<td>TypeDString
3127
<tr><td>TYPE_LIST<td>TypeList
3128
<tr><td>TYPE_CODE<td>TypeCode
3129
<tr><td>TYPE_FUNCPTR<td>TypeFuncPtr
3130
<tr><td>TYPE_NATIVE_CODE<td>TypeNativeCode
3131
<tr><td>TYPE_ENUM<td>TypeEnum
3132
<tr><td>PROPDEF_ANY<td>PropDefAny
3133
<tr><td>PROPDEF_DIRECTLY<td>PropDefDirectly
3134
<tr><td>PROPDEF_INHERITS<td>PropDefInherits
3135
<tr><td>PROPDEF_GET_CLASS<td>PropDefGetClass
3136
<tr><td>STR_HTML_KEEP_SPACES<td>HtmlifyKeepSpaces
3137
<tr><td>STR_HTML_KEEP_NEWLINES<td>HtmlifyKeepNewlines
3138
<tr><td>STR_HTML_KEEP_TABS<td>HtmlifyKeepTabs
3139
<tr><td>STR_HTML_KEEP_WHITESPACE<td>HtmlifyKeepWhitespace
3140
<tr><td>T3DBG_CHECK<td>T3DebugCheck
3141
<tr><td>T3DBG_BREAK<td>T3DebugBreak
3142
<tr><td>OBJ_INSTANCES<td>ObjInstances
3143
<tr><td>OBJ_CLASSES<td>ObjClasses
3144
<tr><td>OBJ_ALL<td>ObjAll
3145
<tr><td>REPLACE_ONCE<td>ReplaceOnce
3146
<tr><td>REPLACE_ALL<td>ReplaceAll
3147
<tr><td>GETTIME_DATE_AND_TIME<td>GetTimeDateAndTime
3148
<tr><td>GETTIME_TICKS<td>GetTimeTicks
3149
<tr><td>INEVT_KEY<td>InEvtKey
3150
<tr><td>INEVT_TIMEOUT<td>InEvtTimeout
3151
<tr><td>INEVT_HREF<td>InEvtHref
3152
<tr><td>INEVT_NOTIMEOUT<td>InEvtNotimeout
3153
<tr><td>INEVT_EOF<td>InEvtEof
3154
<tr><td>INEVT_LINE<td>InEvtLine
3155
<tr><td>INEVT_END_QUIET_SCRIPT<td>InEvtEndQuietScript
3156
<tr><td>INDLG_OK<td>InDlgOk
3157
<tr><td>INDLG_OKCANCEL<td>InDlgOkcancel
3158
<tr><td>INDLG_YESNO<td>InDlgYesNo
3159
<tr><td>INDLG_YESNOCANCEL<td>InDlgYesNoCancel
3160
<tr><td>INDLG_ICON_NONE<td>InDlgIconNone
3161
<tr><td>INDLG_ICON_WARNING<td>InDlgIconWarning
3162
<tr><td>INDLG_ICON_INFO<td>InDlgIconInfo
3163
<tr><td>INDLG_ICON_QUESTION<td>InDlgIconQuestion
3164
<tr><td>INDLG_ICON_ERROR<td>InDlgIconError
3165
<tr><td>INDLG_LBL_OK<td>InDlgLblOk
3166
<tr><td>INDLG_LBL_CANCEL<td>InDlgLblCancel
3167
<tr><td>INDLG_LBL_YES<td>InDlgLblYes
3168
<tr><td>INDLG_LBL_NO<td>InDlgLblNo
3169
<tr><td>INFILE_OPEN<td>InFileOpen
3170
<tr><td>INFILE_SAVE<td>InFileSave
3171
<tr><td>INFILE_SUCCESS<td>InFileSuccess
3172
<tr><td>INFILE_FAILURE<td>InFileFailure
3173
<tr><td>INFILE_CANCEL<td>InFileCancel
3174
<tr><td>FILETYPE_LOG<td>FileTypeLog
3175
<tr><td>FILETYPE_DATA<td>FileTypeData
3176
<tr><td>FILETYPE_CMD<td>FileTypeCmd
3177
<tr><td>FILETYPE_TEXT<td>FileTypeText
3178
<tr><td>FILETYPE_BIN<td>FileTypeBin
3179
<tr><td>FILETYPE_UNKNOWN<td>FileTypeUnknown
3180
<tr><td>FILETYPE_T3IMAGE<td>FileTypeT3Image
3181
<tr><td>FILETYPE_T3SAVE<td>FileTypeT3Save
3182
<tr><td>SYSINFO_VERSION<td>SysInfoVersion
3183
<tr><td>SYSINFO_OS_NAME<td>SysInfoOsName
3184
<tr><td>SYSINFO_HTML<td>SysInfoHtml
3185
<tr><td>SYSINFO_JPEG<td>SysInfoJpeg
3186
<tr><td>SYSINFO_PNG<td>SysInfoPng
3187
<tr><td>SYSINFO_WAV<td>SysInfoWav
3188
<tr><td>SYSINFO_MIDI<td>SysInfoMidi
3189
<tr><td>SYSINFO_WAV_MIDI_OVL<td>SysInfoWavMidiOvl
3190
<tr><td>SYSINFO_WAV_OVL<td>SysInfoWavOvl
3191
<tr><td>SYSINFO_PREF_IMAGES<td>SysInfoPrefImages
3192
<tr><td>SYSINFO_PREF_SOUNDS<td>SysInfoPrefSounds
3193
<tr><td>SYSINFO_PREF_MUSIC<td>SysInfoPrefMusic
3194
<tr><td>SYSINFO_PREF_LINKS<td>SysInfoPrefLinks
3195
<tr><td>SYSINFO_MPEG<td>SysInfoMpeg
3196
<tr><td>SYSINFO_MPEG1<td>SysInfoMpeg1
3197
<tr><td>SYSINFO_MPEG2<td>SysInfoMpeg2
3198
<tr><td>SYSINFO_MPEG3<td>SysInfoMpeg3
3199
<tr><td>SYSINFO_HTML_MODE<td>SysInfoHtmlMode
3200
<tr><td>SYSINFO_LINKS_HTTP<td>SysInfoLinksHttp
3201
<tr><td>SYSINFO_LINKS_FTP<td>SysInfoLinksFtp
3202
<tr><td>SYSINFO_LINKS_NEWS<td>SysInfoLinksNews
3203
<tr><td>SYSINFO_LINKS_MAILTO<td>SysInfoLinksMailto
3204
<tr><td>SYSINFO_LINKS_TELNET<td>SysInfoLinksTelnet
3205
<tr><td>SYSINFO_PNG_TRANS<td>SysInfoPngTrans
3206
<tr><td>SYSINFO_PNG_ALPHA<td>SysInfoPngAlpha
3207
<tr><td>STATMODE_NORMAL<td>StatModeNormal
3208
<tr><td>STATMODE_STATUS<td>StatModeStatus
3209
<tr><td>SCRFILE_QUIET<td>ScriptFileQuiet
3210
<tr><td>SCRFILE_NONSTOP<td>ScriptFileNonstop
3211
<tr><td>CHARSET_DISPLAY<td>CharsetDisplay
3212
<tr><td>CHARSET_FILE<td>CharsetFile
3213
<tr><td>firstPerson<td>FirstPerson
3214
<tr><td>secondPerson<td>SecondPerson
3215
<tr><td>thirdPerson<td>ThirdPerson
3216
<tr><td>spellIntTeenHundreds<td>SpellIntTeenHundreds
3217
<tr><td>spellIntAndTens<td>SpellIntAndTens
3218
<tr><td>spellIntCommas<td>SpellIntCommas
3219
<tr><td>Logical<td>logical
3220
<tr><td>LogicalRank<td>logicalRank
3221
<tr><td>LogicalRankOrd<td>logicalRankOrd
3222
<tr><td>Dangerous<td>dangerous
3223
<tr><td>NonObvious<td>nonObvious
3224
<tr><td>IllogicalNow<td>illogicalNow
3225
<tr><td>Illogical<td>illogical
3226
<tr><td>Inaccessible<td>inaccessible
3227
<tr><td>DefaultReport<td>defaultReport
3228
<tr><td>MainReport<td>mainReport
3229
<tr><td>ReportBefore<td>reportBefore
3230
<tr><td>ReportAfter<td>reportAfter
3231
<tr><td>ReportFailure<td>reportFailure
3232
<tr><td>IsNonDefaultReport<td>gIsNonDefaultReport
3233
<tr><td>SingleDobj<td>singleDobj
3234
<tr><td>SingleIobj<td>singleIobj
3235
<tr><td>DobjList<td>dobjList
3236
<tr><td>IobjList<td>iobjList
3237
<tr><td>NumberPhrase<td>singleNumber
3238
<tr><td>TopicPhrase<td>singleTopic
3239
<tr><td>LiteralPhrase<td>singleLiteral
3240
<tr><td>DirPhrase<td>singleDir
3241
3242
</table>
3243
</center>
3244
3245
<li>Added Phil Lewis's new Adv3 Reference Help to Workbench for
3246
Windows.  This new Windows Help file is a reference to the classes
3247
in the adv3 library; Phil created it for his own use but has
3248
graciously offered it for inclusion in the Author's Kit distribution.
3249
Phil says the reference isn't complete, but it has a wealth of
3250
information all the same.  The Adv3 Help can be reached from the
3251
"TADS 3 Library" item on the Workbench "Help" menu.
3252
3253
<li>The compiler can now search for source files using a
3254
user-specified list of directories.  This allows makefiles (.t3m
3255
files) to specify source files using only relative filename paths,
3256
eliminating any dependency in a makefile on the local system's
3257
directory structure and thus allowing the project to be easily used on
3258
other systems.  The compiler searches for its files by looking in the
3259
following locations, in order:
3260
3261
<ul>
3262
  <li>The current working directory (for Workbench users, this is the
3263
      directory containing the .t3m file for the project).
3264
3265
  <li>The directories specified with "-Fs" compiler options, in the
3266
      order of the options.
3267
3268
  <li>The directories specified with the new "user library" mechanism.
3269
3270
  <li>The "system library" directory.  This is the special directory
3271
      containing the compiler's own libraries.  This directory varies
3272
      by system, but it is normally set up automatically when TADS is
3273
      installed and requires no user action to configure.
3274
</ul>
3275
3276
The "user library" list is specified using a system-dependent
3277
mechanism:
3278
3279
<ul>
3280
  <li>For the DOS/Windows command-line compiler (i.e., run from a
3281
      command prompt), set the environment variable TADSLIB
3282
      to a list of directories, separated by semicolons (";").
3283
3284
  <li>For Workbench for Windows, enter the list of directories in
3285
      the "Libraries" page of the Workbench preferences dialog,
3286
      reachable from the "Options" item on the "View" menu.
3287
3288
  <li>The mechanisms for other systems are yet to be determined,
3289
      but in all likelihood Unix will use the same TADSLIB
3290
      environment variable as the DOS version.
3291
</ul>
3292
3293
<li>Workbench for Windows has a new option to automatically load
3294
the most recent project when Workbench is started.  To set the
3295
start-up mode, use the "Start-Up" page of the Workbench preferences
3296
dialog, reachable from the "Options" item on the "View" menu.
3297
3298
<li>Added the new systemInfo() code SysInfoOgg, which senses whether
3299
or not the interpreter supports Ogg Vorbis audio playback.
3300
3301
<li>Changed <tt>inputEvent()</tt> so that it accepts a nil timeout
3302
argument value, for consistency with <tt>inputLine()</tt>.  A nil
3303
value for the timeout is equivalent to omitting the timeout argument
3304
entirely: it indicates that the input should be allowed to proceed
3305
indefinitely.
3306
3307
<li>The compiler now stores preprocessor symbol (macro) definitions
3308
with the debugger records of the compiled program, when compiling
3309
for source-level debugging (i.e., using the "-d" compiler command-line
3310
option).  The debugger uses the preprocessor symbols when parsing
3311
expressions during the debugging session, so it is now possible
3312
to interactively evaluate expressions involving macros.  Note that
3313
the compiler keeps debugging records for a macro only if the macro
3314
(1) is never undefined (using #undef) or redefined with a different
3315
expansion within a given module, and (2) has the exact same expansion
3316
in every module in which it is defined; these restrictions mean that
3317
only macros with consistent "global" meanings across the entire
3318
program are visible in the debugger.
3319
3320
<li>Fixed a problem in Workbench for Windows that caused an incorrect
3321
name to be stored for the game's initial source file when creating a
3322
new project.
3323
3324
<li>Fixed a compiler problem that caused the compiler to crash when
3325
confronted with a constant index expression where the indexed value
3326
was not a list (e.g., <tt>1[1]</tt>).
3327
3328
<li>Fixed a problem in the Windows HTML interpreter that prevented
3329
interrupted command lines from continuing correctly.  When a command
3330
line input was interrupted by a timeout, the command line that was
3331
under construction when the timeout occurred was not properly restored
3332
for further editing.  This has been corrected.
3333
3334
<li>Fixed a problem in the VM that caused the VM to crash under rare
3335
circumstances.  The problem was particularly likely to occur when
3336
stepping through large amounts of code with the debugger.
3337
3338
<li>Fixed a problem in the character map compiler (mkchrtab) that
3339
generated corrupted character map files when the source file had
3340
duplicated display mapping entries.
3341
3342
<li>The distributions (including the installer kits and the source
3343
code distribution) now include a full set of character mapping files
3344
that should cover most users on most platforms.  For a listing of
3345
the included codings, see charmap/README.txt.  (The full set adds
3346
only about 25k to the compressed distribution files, which seems a
3347
small cost for the simplicity of having an essentially universal set
3348
of mappings available with the default install.)
3349
3350
<li>The Windows Author's Kit installer now associates .t3m files with
3351
Workbench, so that double-clicking on a .t3m file from Windows
3352
Explorer will open the file in Workbench.  (The 4/7/2002 version still
3353
set the association for .t3c files instead, despite Workbench's switch
3354
to .t3c files for storing project configuration information.)
3355
3356
<li>Fixed a problem that caused the compiler to display the incorrect
3357
text for invalid tokens in certain error messages related to 'grammar'
3358
statement syntax.
3359
3360
</ul>
3361
3362
<!------------------------------------------------------------------------>
3363
<h3>Changes for 04/07/2002</h3>
3364
3365
<ul>
3366
3367
<li>Workbench for Windows now uses the compiler makefile (.t3m) file
3368
format to store its project information.  This means that a Workbench
3369
project file can be used directly as a compiler makefile, using
3370
the compiler's "-f" option.  For the moment, Workbench is still capable
3371
of loading 
3372
3373
<li>Workbench on Windows now monitors for Ctrl+Break, and breaks into
3374
the debugger when this key combination is detected.  This allows
3375
easily breaking into the debugger if the .t3 program enters an
3376
infinite loop.
3377
3378
<li>The 'replace' and 'modify' keywords can now be used to change
3379
'grammar' definitions.  Refer to the <a href="sysman/gramprod.htm">Grammar
3380
Rules</a> documentation for details.
3381
3382
<li>A grammar production object can now be declared without creating
3383
any rules associated with the production.  The new syntax is simply
3384
"grammar <i>production_name</i>;" (that is, a "grammar" statement that
3385
simply ends after the name of the production).  This can be useful for
3386
libraries that want to define rules that refer to productions for
3387
which the library itself provides no rules, so that games based on the
3388
library can fill in the grammar definitions for the productions.  In
3389
the past, if a production was referenced as a subproduction from one
3390
or more rules but had no rules of its own defined, the linker
3391
generated an error, because it is likely in such cases that the rules
3392
referring to the undeclared production were misspelled and meant to
3393
refer to a declared production; this new syntax gives the author a way
3394
to tell the compiler explicitly that a production name was used
3395
intentionally, even if the production has no rules.
3396
3397
<li>Added new syntax that allows multiple part-of-speech properties
3398
(such as "noun" or "adjective") to be used as a single token matcher
3399
in a grammar rule.  The new syntax uses a list of properties in
3400
angle brackets: <tt>&lt;noun adjective plural&gt;</tt>.  When
3401
this syntax is used, an input token matching any of the part-of-speech
3402
properties in the list matches the rule token position.
3403
3404
<li>Moved the "build configuration" information that was formerly
3405
stored in object (.t3o) files into the symbol (.t3s) files instead.
3406
The compiler uses the build configuration data stored in these files
3407
to determine if recompilation of a given source file is necessitated
3408
by build configuration changes since the last time the file was
3409
compiled.  In the past, when the information was stored in the object
3410
files, the compiler unnecessarily regenerated symbol files repeatedly
3411
when compilations failed due to syntax errors, because compilation
3412
didn't get far enough to store the build data.  Moving the information
3413
to the symbol files allows the compiler to skip symbol table
3414
generation when a previous compilation generated a valid symbol file
3415
for a given module.  This saves time in the build-edit-build cycle
3416
when a program is initially compiled and contains syntax errors.
3417
3418
<li>Added two new pseudo-variable keywords: <tt>targetobj</tt> and
3419
<tt>definingobj</tt>.  These pseudo-variables are similar to
3420
<tt>self</tt> and <tt>targetobj</tt>, in that they act like
3421
read-only variables (i.e., you cannot assign values to them), and
3422
they are automatically maintained by the interpreter to keep track
3423
of the current method context.  <tt>targetobj</tt> returns the "original
3424
target object" of the current method; this is the object that was
3425
targeted by the method call that reached the current method.  The
3426
target object is set each time a method is called normally or via
3427
<tt>delegated</tt>, and remains the same as methods are invoked
3428
via <tt>inherited</tt>.  <tt>definingobj</tt> is the object that
3429
defines the currently executing method; this is normally simply
3430
the object where the method was actually defined in the program's
3431
source code.
3432
3433
<li>Removed the <tt>getMethodDefiner()</tt> intrinsic function from
3434
the "tads-gen" function set.  This function has been replaced by
3435
the new pseudo-variable <tt>definingobj</tt>.
3436
3437
<li>Changed the interface of the Object.propInherited() intrinsic
3438
class method.  The method now takes an additional argument (positionally
3439
the second argument in the new interface) giving the original target
3440
object of the call.  In cases where the caller wishes to know
3441
if the currently active method can inherit a base class method, the
3442
value for the new argument should simply be <tt>targetobj</tt>.
3443
3444
<li>Changed the way <tt>inherited</tt> behaves after
3445
<tt>delegated</tt> is used.  In the past, the inheritance mechanism
3446
tried to find the defining object of the method with the
3447
<tt>inherited</tt> operator in the inheritance tree of "self".  After
3448
<tt>delegated</tt>, the defining object is normally not related by
3449
inheritance to "self", so the old search pattern normally failed to
3450
find any inherited instance of the method.  Now, the interpreter keeps
3451
track internally of the "original target" object in addition to the
3452
"self" object; the original target is always the target of the last
3453
explicit method call or the target of the most recent
3454
<tt>delegated</tt> operator.  The <tt>inherited</tt> operator uses the
3455
original target object as the starting point of the inheritance tree
3456
search, rather than "self"; this allows <tt>inherited</tt> to find
3457
methods inherited from base classes of the delegatee when appropriate.
3458
3459
<li>Fixed a compiler bug that caused incorrect code to be generated
3460
for statements like this: <tt>if (<i>constant_expr</i> &amp;&amp;
3461
<i>non_constant_expr</i>)</tt> - that is, an "if" whose condition
3462
expression consists of a constant expression (i.e., an expression
3463
whose value can be determined at compile-time) and a non-constant
3464
expression joined by the "&amp;&amp;" operator.  The code that the
3465
compiler generated caused unpredictable results at run-time, and was
3466
able to crash the interpreter in some cases.  This has been corrected.
3467
3468
<li>Increased the standard VM stack size to 4096 stack slots (from 1024).
3469
3470
<li>Expanded the compiler's maximum symbol length to 80 characters,
3471
to accomodate the longer symbols generated by the new treatment of
3472
production match object tagged names as actual compiler symbols.
3473
3474
<li>Fixed a problem that caused a sporadic interpreter crash when
3475
using restartGame().  This crash occurred only rarely, and was related
3476
to memory management during program re-initialization.  This should no
3477
longer occur.
3478
3479
<li>Fixed a problem with restoreGame() that caused modifications to
3480
intrinsic classes to be lost in some cases.  This problem occurred
3481
rarely, and should no longer occur.
3482
3483
<li>Changed the character mapping input file format slightly.  The
3484
"unicode_to_local" keyword has been renamed to "display_mappings",
3485
and has a slightly different effect: in the "display_mappings"
3486
section, each character mapping gives the <b>Unicode</b> expansion
3487
of a Unicode code point; that is, each mapping specifies a set of
3488
Unicode characters to substitute for the Unicode character being
3489
mapped.  The expansion is then further translated automatically by
3490
the character mapper to the local character set.  Each expansion
3491
<b>must</b> map to characters defined in the one-to-one mapping
3492
section (i.e., the set of mappings before the "display_mappings"
3493
keyword).  Note in particular that an expansion <b>cannot</b>
3494
map to characters that are themselves further expanded.  The purpose
3495
of this change is to allow the interpreter to perform expansion
3496
mappings - that is, mappings that can translate one Unicode character
3497
to several display characters - while still in the Unicode domain,
3498
and hence to perform operations such as word-wrapping on the expansions.
3499
The console output formatter uses this to properly word-wrap lines with
3500
expanded display mappings.
3501
3502
</ul>
3503
3504
<!------------------------------------------------------------------------>
3505
<h3>Changes for 03/16/2002</h3>
3506
3507
<ul>
3508
3509
<li>Fixed script-reading mode in the interpreter.  Past versions did
3510
not correctly read input scripts (using the command-line interpreter's
3511
"-i" option, for example).
3512
3513
<li>Added the new input event code INEVT_END_QUIET_SCRIPT, which is
3514
described in the documentation for the
3515
<a href="sysman/tadsio.htm">inputLineTimeout</a>
3516
intrinsic function.
3517
3518
<li>Added a couple of small usabilty enhancements to Workbench for Windows:
3519
  <ul>
3520
  <li>Pushing the Return/Enter key when keyboard focus is in the Project
3521
      window opens the selected module in a source file window, if a module
3522
      is selected.  This allows easier keyboard navigation of the Project
3523
      file list.
3524
  <li>Double-clicking on a module in the Project window now moves keyboard
3525
      focus to the newly-opened source file window.  In the past, focus
3526
      stayed on the Project window, so context-sensitive commands (such
3527
      as "Find") did not apply to the newly-opened source window until
3528
      manually clicking on the window to activate it.
3529
  </ul>
3530
3531
<li>Fixed a bug in <tt>mkchrtab</tt> (the character map compiler)
3532
that caused incorrect mappings in some compiled mapping files having
3533
display (from_unicode_to_local) mappings that expanded to more than
3534
one byte.
3535
3536
<li>Fixed a problem in the Windows interpreter that made it
3537
incompatible with Windows 95.  The interpreter should once again be
3538
compatible with Windows 95.
3539
3540
</ul>
3541
3542
<!------------------------------------------------------------------------>
3543
<h3>Changes for 03/10/2002</h3>
3544
3545
<ul>
3546
3547
<li>Added the new method removeElement() to the <a href="sysman/vector.htm">
3548
Vector intrinsic class</a>.  This new method removes an element by
3549
value, modifying the vector in-place.
3550
3551
<li>Added the new method forEachWord() to the <a href="sysman/dict.htm">
3552
Dictionary intrinsic class</a>.  This new method provides a way of
3553
enumerating all of the entries in a Dictionary object.
3554
3555
<li>Added information to the LICENSE.TXT file making it clear that
3556
derived versions of the library are permitted with few restrictions.
3557
3558
<li>The "!" operator can now take an object reference as its operand;
3559
when applied to a non-nil object reference, "!" yields nil.  This
3560
means that constructs such as "if (!obj)" are now treated as equivalent
3561
to "if (obj == nil)"; such constructs formerly generated a run-time
3562
error.  In addition, property ID's, single-quoted strings, lists,
3563
and function pointers can all be used as operands of "!", and "!"
3564
applied to any of these types yields nil.
3565
3566
<li>Fixed a compiler bug that caused the compiler to crash in some
3567
cases when confronted with an empty pair of parentheses within a
3568
grammar rule, such as <tt>grammar myProd: ('mytoken' ())</tt>.
3569
3570
<li>Fixed a compiler bug that caused the compiler to crash in some
3571
cases when given a method definition with no code body and the end of
3572
the object immediately following.
3573
3574
<li>Fixed a compiler bug that caused incorrect code generation for
3575
an 'if' with a constant controlling expression that evaluated to
3576
true and no 'else' clause.  In such cases, the true branch of the
3577
'if' was not generated; this has been corrected.
3578
3579
<li>The project file extension for Workbench for Windows is now
3580
".t3c" (it was formerly ".tdc", the same as it was for the TADS 2
3581
Workbench).  The extension has been changed to allow the Windows
3582
desktop to launch the appropriate version of Workbench when the user
3583
double-clicks a project file from the desktop and both TADS 2 and
3584
ADS 3 Workbench versions are installed.
3585
3586
<li>Fixed a problem in the VM that caused repeated "terminate game"
3587
dialogs to appear in Workbench for Windows when the user attempted
3588
to compile the game after the debugger intercepted a run-time error.
3589
3590
<li>Fixed a problem in the character map compiler (mkchrtab) that
3591
caused invalid map files to be generated if the source file had more
3592
than one symmetric (bidirectional) mapping assigned to the same
3593
Unicode code point.  The character map compiler now generates a
3594
warning when these collisions occur, and generates valid map files
3595
even when collisions are present by ignoring redundant mappings.
3596
3597
</ul>
3598
3599
<!------------------------------------------------------------------------>
3600
<h3>Changes for 02/17/2002</h3>
3601
3602
<ul>
3603
3604
<li>The compiler now shows a summary count of warnings and errors at
3605
the end of the compiler console output when either count is non-zero,
3606
to make it more obvious that messages were generated during the
3607
compilation.  If many modules are included in a compilation, the
3608
status messages that the compiler generates as it works through the
3609
module list can make it easy to miss an error or warning mixed in
3610
among all the status messages.  The new summary at the end of the
3611
compilation should make it easier to notice when something requires
3612
attention.  No summary counts are displayed when there are no warnings
3613
or errors; this is intended to make it even easier to notice when
3614
something is wrong, since authors will not be accustomed to seeing
3615
a summary count at all when everything is well.
3616
3617
<li>The <a href="sysman/iter.htm">Iterator intrinsic class</a> has the new
3618
methods getCurVal() and getCurKey(), which return the value and key
3619
of the current element of the iteration, respectively.  For indexed
3620
collections, the "key" is the index of the current element.
3621
3622
<li>LookupTable.forEach() no longer passes the key argument to the
3623
callback.  If the key is desired, use the new method forEachAssoc()
3624
instead.  This allows LookupTable to be used more interchangeably
3625
with other Collection subclasses, since its forEach() method has the
3626
same interface as the corresponding method of other Collection
3627
subclasses.
3628
3629
<li>LookupTable, List, and Vector now have the additional method
3630
forEachAssoc(func), which calls func(key,val) for each element of
3631
the collection.  For List and Vector, the "key" is the index of
3632
the element; for LookupTable, it is the key for the entry.
3633
3634
<li>The Array intrinsic class has been deleted; Vector should be used
3635
instead.  The Array class was too similar to the Vector class to
3636
justify its existence as a separate type, so the functionality of
3637
Array and Vector are now combined into the single Vector class.
3638
3639
<li>When a Vector is used as the left-hand side of a '+' or '-'
3640
operation, in the past, the VM modified the left-hand side Vector
3641
object directly.  This has been changed so that a new Vector is
3642
created, and the original left-hand Vector is left unchanged.  The
3643
old behavior was confusing in that it gave the '+' and '-' operators
3644
side effects, which is inconsistent with the behavior of the
3645
operators in other situations.
3646
3647
<li>A new Vector method, appendAll(), allows appending the individual
3648
elements of a List or Vector to another Vector in-place (i.e., without
3649
creating a new Vector object, as the '+' operator does).
3650
3651
<li>The Vector methods getUnique() and subset() now return a new
3652
Vector to store the result of the operation.  In the past, these
3653
methods modified the original Vector in place.
3654
3655
<li>In the past, when a Vector was used as the right-hand side of a
3656
'+' operator whose left-hand side was a List or Vector, the List or
3657
Vector on the right was the single new element concatenated to the
3658
left-hand collection.  This was inconsistent with the handling of
3659
List values; a List value concatenates its elements individually when
3660
used as the right-hand side of a '+' operator.  For consistency,
3661
Vector now concatenates its elements individually when used on the
3662
right side of a '+' operator.  Similarly, Vector values now subtract
3663
their elements from the left-hand side collection when used as the
3664
right-hand side of a '-' operator, also for consistency with the List
3665
type's behavior.
3666
3667
<li>Fixed a problem in the VM that caused the VM to lose track of
3668
intrinsic class modifiers after a RESTORE operation.  Intrinsic
3669
class modifiers will now properly survive RESTORE operations.
3670
3671
</ul>
3672
3673
3674
<!------------------------------------------------------------------------>
3675
<h3>Changes for 02/09/2002</h3>
3676
3677
<ul>
3678
3679
<li>Changed <tt>inputLineTimeout</tt> so that it accepts a nil
3680
timeout argument value.  A nil value for the timeout is equivalent to
3681
omitting the timeout argument entirely: it indicates that the input
3682
should be allowed to proceed indefinitely.
3683
3684
<li>Improved <tt>inputLineTimeout</tt>'s interaction with the OS
3685
layer so that the portable code can handle complete non-implementation
3686
of input-with-timeout by the OS layer.
3687
3688
<li>Changed <tt>getTime(GETTIME_TICKS)</tt> so that the function always
3689
chooses the zero point of the system clock as the time of the first
3690
call to the function.  This reduces the likelihood that a game will
3691
encounter a roll-over of the system clock, which could lead to confusion
3692
in interpreting time differences and the ordering of events.
3693
3694
<li>Changed the names of two methods in the LookupTable intrinsic
3695
class.  The method formerly called countBuckets() is now
3696
getBucketCount(), and the method formerly called countEntries() is
3697
now getEntryCount().  These names match the names as given in the
3698
documentation, but the header file (lookup.h) had the old names.
3699
3700
<li>Added the compiler option "-clean", which causes the compiler
3701
to skip ordinary compilation and instead simply remove all derived
3702
files that the compilation would have produced; in particular, this
3703
removes the symbol (.t3s), object (.t3o), and image (.t3) files that
3704
the compilation would have produced.
3705
3706
<li>Added the compiler option "-Pi", which causes the compiler to
3707
skip ordinary compilation and instead write to the standard output a
3708
list of files included with <tt>#include</tt> directives throughout
3709
the program.  The compiler runs the normal preprocessing, and shows
3710
only files included in conditional compilation sections that are
3711
selected in the compilation (in other words, the list does not
3712
include any files included from within the false branches of
3713
<tt>#if</tt> or other conditional compilation directives).  In the
3714
generated list, the files are listed one file per line, and each line
3715
specifying a file consists of the characters "<tt>#include</tt>",
3716
followed by a single space, followed by the name of the included
3717
file, followed by a newline sequence.  The name of the included file
3718
is not enclosed in any quote marks or other delimiters.  This format
3719
is intended to simplify automatic processing of the list by clearly
3720
marking each line in the output that names an included file.  Note
3721
that the list of included files might include a given file more than
3722
once, because each file is listed as it's included, and it is possible
3723
to include a given file more than once.
3724
3725
<li>When the compiler is run with the "-P" option (which writes the
3726
preprocessed version of the source to standard output), the compiler
3727
now prefixes the generated source with the directive <tt>#charset
3728
"utf8"</tt> to indicate the character set of the preprocessed source.
3729
3730
<li>Added a compiler warning message when the preprocessor finds a
3731
line that ends with a backslash followed by whitespace.  While this
3732
format is legal (because it could be useful in defining a macro that
3733
is later "stringized"), it is highly unusual.  Since trailing spaces
3734
are not usually visible in a text editor, the programmer might not
3735
be aware of their presence; and since the presence of the trailing
3736
spaces materially changes the meaning of the program, the compiler
3737
warns about them.  Note that the warning can be suppressed by adding
3738
a comment at the end of the line; this doesn't change the meaning
3739
of the program but does make the spaces visually evident in a text
3740
editor, so the compiler recognizes that the warning is not necessary
3741
in this case.
3742
3743
<li>Fixed a VM problem that caused the garbage collector to
3744
incorrectly delete intrinsic class objects under certain unusual
3745
circumstances.  When an intrinsic class is used implicitly but never
3746
specifically declared in the compiled program, the VM creates an
3747
object to represent the intrinsic class during the initial program
3748
load.  In the past, it was possible for the garbage collector to
3749
regard such an object as unreachable even though it is always
3750
reachable via the native code implementing its corresponding
3751
intrinsic class.  This problem sometimes led to VM crashes.  The
3752
problem should no longer occur.
3753
3754
<li>Fixed a compiler problem that caused incorrect compilation for a
3755
grammar rule specified with an alternation (two or more sub-rules,
3756
each separated by an "|" symbol) and an empty final sub-rule.  In
3757
such cases, the compiler incorrectly generated two copies of the
3758
empty sub-rule, leading to two match objects being created at
3759
run-time each time the empty sub-rule was matched.  This has been
3760
corrected.
3761
3762
<li>Changed <tt>inherited</tt> so that it searches for the next
3763
inherited definition of the property as though the currently active
3764
method (and any overriding definitions) had simply never been
3765
defined.  This makes <tt>inherited</tt> work roughly the same way as
3766
the <tt>inheritNext</tt> method that was formerly defined in the
3767
<tt>MixIn</tt> class in the adventure game library (adv3).
3768
3769
<li>Added a new <tt>Object</tt> method, <tt>propInherited</tt>, which
3770
determines if a method is inherited, using the new rules of the
3771
<tt>inherited</tt> operator.  This provides functionality equivalent
3772
to the <tt>canInheritNext</tt> method formerly defined in the
3773
<tt>MixIn</tt> class in the adventure game library.
3774
3775
</ul>
3776
3777
<!------------------------------------------------------------------------>
3778
<h3>Changes for 01/13/2002</h3>
3779
3780
<ul>
3781
3782
<li>The compiler can now read <a href="sysman/build.htm">"library"
3783
files</a>, which are lists of
3784
source files to be included in the compilation.  Library files can be
3785
used to simplify compiler command lines and makefiles when including
3786
sets of source files that usually act as a group, such as the
3787
standard adventure library sources.
3788
3789
<li>Workbench can now show library files in the project window.  You
3790
can add a library file to the project window's source file list in
3791
the same way as you can add a source file; the library shows its
3792
contained source files as a subtree.  Each source file within a
3793
library is shown with a checkbox, indicating whether or not the file
3794
is included in compilations; if you want to exclude a file within a
3795
library from compilation, click on the checkbox to remove the
3796
checkmark.  The checkbox settings are stored with the project and
3797
don't affect the library itself, so you can use the same library in a
3798
different project, and include and exclude different sets of files.
3799
3800
<li>The debugger no longer uses a RuntimeError exception to terminate
3801
the program being debugged.  In the past, when the user terminated
3802
the running program using the debugger "Stop" button, or by starting
3803
a new compilation of the program while the program was still running,
3804
the debugger attempted to terminate the program by throwing a
3805
RuntimeError with system error code 2390.  This approach wasn't
3806
completely reliable, because it allowed the running program to
3807
catch the exception and keep running; programs sometimes inadvertantly
3808
caught the error as part of an inclusive "catch" handler, causing
3809
strange interactions with the debugger user interface.  The debugger
3810
now halts the program by telling the VM not to execute any more program
3811
instructions, which guarantees that the program stops immediately.
3812
This new approach should be much more robust and should avoid the
3813
strange effects that sometimes occurred with the old mechanism.
3814
3815
<li>Fixed a problem in the compiler that caused the compiler to hang
3816
when given a makefile (a .t3m file) that didn't end with a newline
3817
character.
3818
3819
<li>Fixed a compiler problem that generated an incorrect set of
3820
grammar rule patterns for grammars involving nested alternatives
3821
(i.e., parenthesized "|" expressions).  In the past, the compiler
3822
incorrectly generated multiple copies of the top-level expressions
3823
in such rules, leading to run-time generation of multiple redundant
3824
matches for these expressions.  This has been corrected; the compiler
3825
now generates only one copy of each top-level rule in an alternation.
3826
3827
<li>Fixed an interpreter problem that caused the interpreter to crash
3828
when an HTML &lt;TITLE&gt; tag was displayed.
3829
3830
<li>Fixed a problem in the debugger that caused memory leaks and
3831
other incorrect behavior when the user attempted to run the program,
3832
but the program had not been compiled (or had not been compiled with
3833
debugging information).
3834
3835
<li>When Workbench needs to find a source file during program tracing
3836
in the debugger, it now scans the project list to find the file.  In
3837
the past, the debugger used only the source path to find files,
3838
leading to annoying interactive requests to locate files that were in
3839
plain view in the project window.
3840
3841
</ul>
3842
3843
<!------------------------------------------------------------------------>
3844
<h3>Changes for 01/05/2002</h3>
3845
3846
<ul>
3847
3848
<li>Added the new intrinsic functions
3849
<a href="sysman/tadsio.htm"><tt>inputLineTimeout()</tt></a>,
3850
which allows reading a line of text with an optional timeout.  This
3851
function can be used to combine command-line input with real-time
3852
effects, because it allows a command line to be interrupted if the
3853
command is not completed before a real-time interval elapses.
3854
3855
<li>Fixed a problem in the Dictionary class: the
3856
<tt>isWordDefinedTrunc()</tt> method used the wrong truncation length
3857
in its comparison - it required the string to be matched to be at
3858
least one character longer than the dictionary's truncation length.
3859
It now uses the correct truncation length.
3860
3861
</ul>
3862
3863
<!------------------------------------------------------------------------>
3864
<h3>Changes for 12/30/2001</h3>
3865
3866
<ul>
3867
3868
<li>The compiler now parses a <tt>delegated</tt> expression so that
3869
the object expression is taken to exclude function or method calls.
3870
That is, if parentheses follow the expression giving the target
3871
object of the delegation, these are taken to give the argument list
3872
of the delegation call itself, rather than of the expression giving
3873
the target object value.  This change makes <tt>delegated</tt>
3874
syntactically parallel to <tt>inherited</tt> in that the target
3875
property can be omitted from the expression, in which case the
3876
delegation target property is the same as the property being
3877
evaluated in the caller.  (If a function or method call is desired
3878
in the object expression itself, this can be easily accomplished
3879
by enclosing the entire object expression in parentheses.)
3880
3881
<li>Workbench now stores its project configuration files so that the
3882
absolute file system path to "system" files is not stored; instead,
3883
system files are flagged as system files, and their locations are
3884
stored relative to the system directory.  A "system" file is simply a
3885
file that is stored in the Workbench install directory or any of its
3886
subdirectories; the system directory is the directory containing the
3887
Workbench program executable.  This change makes project
3888
configurations more readily moveable from one system to another,
3889
because it eliminates any dependency in the project configuration
3890
on the particular directory in which Workbench is installed.
3891
3892
<li>The compiler now treats the symbol and object path options as
3893
overriding all module source paths, even when the filenames are given
3894
with "absolute" (as opposed to relative) path names.
3895
3896
</ul>
3897
3898
<!------------------------------------------------------------------------>
3899
<h3>Changes for 12/23/2001</h3>
3900
3901
<ul>
3902
3903
<li>Added a checksum to the saved game format.  This allows the
3904
interpreter to validate a saved state file, to ensure the file wasn't
3905
corrupted (such as by a text-mode ftp transfer), before attempting to
3906
load the file.
3907
3908
<li>Fixed a problem in the Vector intrinsic class that prevented two
3909
equivalent vectors from comparing equal.
3910
3911
<li>Fixed a compiler problem that caused the compiler to crash in
3912
some cases when a symbol was redefined from function to another type.
3913
3914
<li>Fixed a compiler problem that caused incorrect initialization
3915
of Dictionary objects in the image file in certain cases when
3916
preinitialization ran (i.e., when compiling with the -d option).
3917
3918
</ul>
3919
3920
<!------------------------------------------------------------------------>
3921
<h3>Changes for 12/09/2001</h3>
3922
3923
<ul>
3924
3925
<li>The compiler now accepts URL-style portable path names in #include
3926
directives, and in fact prefers them.  Refer to the 
3927
<a href="sysman/preproc.htm">preprocessor chapter</a> for details.
3928
3929
<li>Added a new method, <a href="sysman/tadsobj.htm">createClone</a>,
3930
to the TadsObject intrinsic class.  This method returns a newly-created
3931
object that is an identical copy of the original object.
3932
3933
</ul>
3934
3935
3936
3937
<!------------------------------------------------------------------------>
3938
<h3>Changes for 12/02/2001</h3>
3939
3940
<ul>
3941
3942
<li>Changed the tokenizer interface (in tok.t) to return a list of
3943
token elements, rather than parallel value/type lists.  Each token
3944
element in the token list is a sublist, consisting of the following
3945
values:
3946
3947
<ul>
3948
  <li>[1] = token value, as set by the matched rule
3949
  <li>[2] = token type enum, as set by the matched rule
3950
  <li>[3] = original source text matched by the rule that matched the token
3951
</ul>
3952
3953
The tok.h header defines macros that extract these elements of a token;
3954
these should be used rather than direct list elements to make your code
3955
more readable.  The macros are getTokVal(tok), getTokType(tok), and
3956
getTokOrig(tok).  So, if <tt>lst</tt> is a variable containing the
3957
result of calling Tokenizer.tokenize(), and you want to retrieve
3958
the type enum for the third token, you'd write <tt>getTokType(lst[3])</tt>.
3959
3960
<li>Changed the tokenizer's rule specifications for greater power and
3961
symmetry in creating rules:
3962
3963
<ul>
3964
  <li>The "flags" entry has been eliminated.  The functionality of the
3965
  only flag that was defined, TOKFLAG_SKIP, has been replaced with the
3966
  improved behavior of the rule processor.  Since the processor method's
3967
  interface is now powerful enough to subsume the functionality of the
3968
  "skip" flag, the special case embodied in the flag is no longer needed.
3969
3970
  <li>The processor method (element [3] in the sublist defining a rule)
3971
  has a new interface.  In the past, this method took a text match and
3972
  returned a token value.  This interface meant that a given rule was
3973
  limited to generating exactly one token.  The new interface takes
3974
  three arguments, and returns no value:
3975
3976
  <p><pre>
3977
    self.(processorProp)(<i>txt</i>, <i>typ</i>, <i>toks</i>)
3978
  </pre><p>
3979
3980
  <i>txt</i> is the text that matched the rule (this is the same as the
3981
  lone argument to the old interface).  <i>typ</i> is the token type from
3982
  the rule (i.e., element [2] of the sublist defining the rule).
3983
  <i>toks</i> is a Vector containing the token list under construction.
3984
  The method must append the appropriate set of tokens to the Vector
3985
  in <i>toks</i>.  The method is not required to append any tokens; the
3986
  rule in the default tokenizer rule set that matches whitespace, for
3987
  example, doesn't generate any tokens, since whitespace characters have
3988
  no significance other than separating tokens in the default rule set.
3989
  The rule is also allowed to generate more than one token; this is useful
3990
  for rules that generate certain tokens types only if they immediately
3991
  follow particular text patterns.  Note that the processor method is
3992
  not required to use the <i>typ</i> value given, since each new token
3993
  the method adds to the result Vector can be of whatever type is 
3994
  appropriate; the type information is included so that a single processor
3995
  method can be re-used for similar types of processing that produce
3996
  different token types.
3997
</ul>
3998
3999
<li>Changed the intrinsic GrammarProd.parseTokens() method to accept
4000
tokens in the new format returned by the tokenizer.  The method now
4001
takes only two arguments, not three: the second argument that formerly
4002
gave the token type list has been eliminated, since each element of
4003
the token list now includes the type information along with the token
4004
value information.
4005
4006
<li>Changed the Dictionary and GrammarProd intrinsic classes to use
4007
case-sensitive matching exclusively.  Case sensitivity in the past
4008
was inconsistent; all functions are now case-sensitive for
4009
consistency.
4010
4011
<li>The template inheritance mechanism is somewhat altered from its
4012
first implementation.  The 'inherited' keyword can now go anywhere
4013
a template; the inherited token lists are treated as substitutions
4014
for 'inherited' at the point at which it appears in the list.
4015
Furthermore, the compiler now treats each template involving
4016
inheritance as a macro defining all possible inherited templates;
4017
when a template is used, it is matched based on the entire expansion
4018
of the template, not on the partial superclass template.  The net
4019
effect is that a template definition involving an 'inherited'
4020
token is identical to the implied set of fully expanded template
4021
definitions.
4022
4023
<li>The -Fs option can now be used to specify a search path for
4024
source files, rather than a single path for all sources as it did in
4025
the past.  Multiple -Fs options can be specified; each one adds one
4026
directory to the source search path.  When a source file name is
4027
specified in "relative" form (as defined by local filename
4028
conventions), the compiler first looks for the file in the working
4029
directory, then searches the directories specified with -Fs options,
4030
in the order in which the options were specified.  The compiler uses
4031
the first instance of the file it finds.
4032
4033
<li>The compiler automatically adds the system-dependent default
4034
system library directory to the source search path.  This directory
4035
is always searched <i>after</i> all directories specified by
4036
the user with -Fs options.  In effect, the compiler adds an
4037
extra -Fs option for the default system library directory after
4038
all user-specified -Fs options.  This allows library sources
4039
(such as reflect.t or gameinfo.t) to be included in a build
4040
configuration (in a .t3m file, for example) without any path
4041
information; the compiler will automatically find these system
4042
files using the implied -Fs setting.
4043
4044
<li>The compiler's default system library and include directories are
4045
now system-dependent.  On DOS and Windows systems, the default
4046
system header and library directories are the same as the compiler
4047
executable's directory (this is the main directory where the TADS 3
4048
tools are installed).  Check your platform-specific release notes
4049
for details on the locations of these directories on other platforms.
4050
4051
<li>Fixed a problem that allowed objects to be deleted by the
4052
garbage collector when they were referenced as superclasses of
4053
other objects.  This caused unpredictable behavior, including
4054
interpreter crashes.
4055
4056
<li>Fixed a problem that affected the results of t3GetStackTrace() in
4057
the non-debug interpreter when a run-time error occurred.  In such
4058
cases, the stack trace incorrectly omitted the innermost level,
4059
where the error actually occurred.  This has been corrected.
4060
4061
<li>Fixed a compiler problem that sometimes caused the compiler to
4062
crash after attempting a link that involved unresolved external
4063
symbol references.
4064
4065
<li>Fixed a GrammarProd parsing problem that caused incorrect token
4066
index information to be returned in certain cases involving productions
4067
with no tokens.
4068
4069
</ul>
4070
4071
<!------------------------------------------------------------------------>
4072
<h3>Changes for 11/17/2001</h3>
4073
4074
<ul>
4075
4076
<li>Extended the <a href="sysman/objdef.htm">object template</a>
4077
syntax to allow template inheritance.  A template definition can now
4078
include the keyword "<tt>inherited</tt>" as its final token; this
4079
indicates that the template "inherits" the templates of its
4080
class's superclasses.
4081
4082
<li>The compiler now detects and reports circular class definitions
4083
(that is, class definitions where the class being defined is a subclass
4084
of one or more its purported superclasses).  In the past, the compiler
4085
did not detect such definitions and could get stuck in infinite loops
4086
or unbounded recursion when they were made.
4087
4088
<li>Fixed a compiler problem that sometimes caused crashes when an
4089
actual parameter list in a macro expansion was not properly terminated
4090
(with a closing parenthesis) in the source file.
4091
4092
<li>Fixed a problem that affected a few Vector methods by incorrectly
4093
returning an empty vector.  This affected the appendUnique, getUnique,
4094
and mapAll methods.
4095
4096
<li>Fixed a compiler problem that caused a modified intrinsic class
4097
to show a spurious extra property in its getPropList() result list.
4098
This property had an undefined type (type code 16).
4099
4100
<li>Fixed a problem in the Vector class that caused unpredictable
4101
results, including crashes, when adding a large list to a vector.
4102
4103
<li>Fixed a problem in the debugger that caused unpredictable
4104
results, including crashes, when interrupting the program in
4105
mid-statement in certain circumstances.  The problem occurred
4106
sporadically in such cases when the garbage collector happened to run
4107
while the debugger had control, but didn't appear until after
4108
returning control to the program.  This problem only manifested
4109
itself rarely, but could cause crashes when it did appear.
4110
4111
<li>Fixed a compiler problem that caused incorrect code to be
4112
generated for calls to operator <tt>new</tt> where the actual
4113
parameters included one or more "..." expressions (i.e., expanded
4114
variable argument lists).  This affected the <i>calling</i> end,
4115
not the receiving end.  The problem caused the caller to send one
4116
fewer argument than it should have.
4117
4118
<li>Fixed a problem in the output formatter that caused log files
4119
to be generated without proper line wrapping in the HTML version
4120
of the interpreter.
4121
4122
<li>Changed the output formatter so that &lt;BANNER&gt; contents
4123
(everything from a &lt;BANNER&gt; tag to the corresponding
4124
&lt;/BANNER&gt; close tag) are not included in the output log.
4125
The contents of a banner are not logically part of the main text
4126
stream so are not appropriate for inclusion in a log file.  This
4127
ensures that HTML-based status lines and other special display
4128
effects do not interfere with the log file contents.
4129
4130
</ul>
4131
4132
<!------------------------------------------------------------------------>
4133
<h3>Changes for 10/21/2001</h3>
4134
4135
<ul>
4136
4137
<li>Fixed a problem that made it impossible to use anonymous functions
4138
that referenced "self" or properties of "self" within property values
4139
defined as simple value expressions (as opposed to methods).  
4140
4141
<li>Changed the compiler to allow using short-form anonymous functions
4142
(i.e., using the "<tt>{args: }</tt>" notation, rather than the "<tt>new
4143
function</tt>" notation) as list elements without enclosing the
4144
functions in parentheses.  In the past, the compiler considered an
4145
open brace at the start of a list element expression as an error; this
4146
was an heuristic intended to catch unterminated list expressions, but
4147
its utility as a diagnostic tool was not sufficient to justify the
4148
superfluous syntax requirement it imposed for this case.
4149
4150
</ul>
4151
4152
4153
4154
<!------------------------------------------------------------------------>
4155
<h3>Changes for 10/07/2001</h3>
4156
4157
<ul>
4158
4159
<li>Added special character sequences '\{' and '\}'.  These are used
4160
to group a set of output formatter setting changes: any changes to
4161
the formatter settings made after a '\{' sequence are undone at the
4162
corresponding '\}' sequence.  In particular, the following state
4163
changes are affected:
4164
4165
  <ul>
4166
    <li>\H+
4167
    <li>\H-
4168
    <li>\H
4169
  </ul>
4170
4171
These new sequences can be used to isolate a run of text from the
4172
enclosing text's formatter settings, so that the text within the '\{
4173
\}' pair doesn't have to worry about the enclosing settings and has
4174
no effect on the enclosing settings.  This can be useful, for
4175
example, if a run of text wants to output an HTML-significant
4176
character, but doesn't know if it will be called with HTML
4177
interpretation turned on or off.  In such cases, the text can
4178
turn HTML interpretation off within the brackets without affecting
4179
its caller: "\{\H-&amp;\}" would display an ampersand, regardless
4180
of whether HTML mode was in effect before the text was displayed,
4181
but will have no effect on subsequent text's HTML mode.
4182
4183
<li>Fixed problems in several intrinsic classes related to saving
4184
and restoring.  These bugs caused crashes in some cases when restoring
4185
saved positions.
4186
4187
<li>Changes the restartGame() behavior slightly.  The function invoked
4188
after the restart is now passed the original command line arguments
4189
to the program; the arguments are passed as a list in the second
4190
parameter to the function.  This allows the function to invoke
4191
the normal main program entrypoint as though the program were being
4192
started normally.
4193
4194
<li>If a saved position file is found to be corrupted in the course
4195
of being restored, the interpreter will now force an exit.  There is
4196
no way for the program to retain control in such cases.  If a saved
4197
position file is corrupted, the partially restored machine state at
4198
the point at which the corruption is detected must be considered
4199
invalid, so the VM cannot safely pass control back to the program.
4200
In such cases, the VM terminates the program to avoid the high
4201
likelihood that the program would crash the VM due to the program's
4202
partially corrupted internal state.
4203
4204
<li>Fixed some problems in the "undo" mechanism that caused
4205
unpredictable behavior (including VM crashes) under some
4206
circumstances.
4207
4208
<li>Fixed a problem in the debugger that caused, in some cases, the
4209
incorrect error code to be reported in the RuntimeError object
4210
representing a VM exception.  This only occurred when the program
4211
was being run in the debugger, and only then when certain types of
4212
expressions were evaluated.  This has been corrected.
4213
4214
</ul>
4215
4216
4217
<!------------------------------------------------------------------------>
4218
<h3>Changes for 09/30/2001</h3>
4219
4220
<ul>
4221
4222
<li>Changed the symbol file format to allow inclusion of intrinsic
4223
function and intrinsic class registration lists.  This is an internal
4224
change only; its purpose is to make the compiler more flexible in
4225
correlating the internal linkage identifiers of intrinsics across
4226
object modules to eliminate the possibility of certain confusing
4227
linking errors.  In the past, it was necessary to keep intrinsic
4228
definitions in a consistent order across separately compiled modules,
4229
which was problematic for library developers and especially for library
4230
extension developers.  Adding the information to the symbol files
4231
allows the compiler to build an intrinsic identifier list globally
4232
across modules to ensure a consistent ordering, even when the
4233
individual modules have conflicting orderings.  This change should
4234
not be visible to users except to the extent that it eliminates
4235
certain errors relating to intrinsic class and intrinsic function
4236
inclusion order.
4237
4238
</ul>
4239
4240
<!------------------------------------------------------------------------>
4241
<h3>Changes for 09/09/2001</h3>
4242
4243
<ul>
4244
4245
<li>Added a new function to the <a href="sysman/tadsio.htm">"tads-io" function
4246
set</a>: <tt>flushOutput()</tt>, which immediately flushes text output
4247
to the display and updates the window, if possible.
4248
4249
<li>Fixed a compiler bug that caused incorrect code to be generated
4250
for implicit constructors for classes with multiple superclasses.
4251
This code generation error did not manifest itself frequently, but
4252
when it did show up caused problems ranging from data value corruption
4253
to interpreter crashes.
4254
4255
<li>The debugger now includes an ampersand prefix when displaying
4256
property pointer values.
4257
4258
</ul>
4259
4260
<!------------------------------------------------------------------------>
4261
<h3>Changes for 08/26/2001</h3>
4262
4263
<ul>
4264
4265
<li>Added new syntax that provides a short-hand notation for defining
4266
a group of properties with similar names and parameters: the new
4267
<a href="sysman/objdef.htm">"propertyset" syntax</a>.
4268
4269
<li>Added a new keyword, "targetprop", a pseudo-variable that
4270
evaluates to the current target property pointer.  The target
4271
property is the property that was invoked to reach the current
4272
method; this new pseudo-variable complements "self" with information
4273
on the property being evaluated in the current "self" object.  The
4274
"targetprop" keyword can only be used in contexts where "self" is
4275
valid.
4276
4277
<li>The "inherited" and "delegated" keywords can be used with new
4278
syntax that omits the target property.  If the target property is
4279
omitted, then the current target property is implied.  The target
4280
property can be omitted from any of the previously-allowed forms of
4281
the "inherited" and "delegated" expressions, as shown here ("delegated"
4282
syntax is parallel to "inherited", so only "inherited" is shown):
4283
4284
   <ul>
4285
   <li><tt>inherited</tt> is equivalent to <tt>inherited.targetprop</tt>
4286
   <li><tt>inherited(<i>arguments</i>)</tt> is equivalent to
4287
        <tt>inherited.targetprop(<i>arguments</i>)</tt>
4288
   <li><tt>inherited <i>superclass_name</i></tt> is equivalent to
4289
        <tt>inherited <i>superclass_name</i>.targetprop</tt>
4290
   <li><tt>inherited <i>superclass_name</i>(<i>arguments</i>)</tt>
4291
        is equivalent to
4292
       <tt>inherited <i>superclass_name</i>.targetprop(<i>arguments</i>)</tt>
4293
   </ul>
4294
4295
<li>Added a new library module, reflect.t, that provides higher-level
4296
reflection services.  This module is optional, but if it is included,
4297
the _main.t module uses reflection to show stack trace listings for
4298
unhandled runtime exceptions.
4299
4300
<li>Added <a href="sysman/t3vm.htm">t3GetStackTrace()</a> to
4301
the 't3vm' intrinsic function set.  This function returns information
4302
on the call stack.
4303
4304
<li>The RuntimeException object defined in _main.t now stores a stack
4305
trace (in the form returned by t3GetStackTrace()) in its stack_
4306
property.  The VM no longer stores an explicit stringized form of
4307
the stack trace when setting the exception message, since the new
4308
stack trace format is more powerful.
4309
4310
<li>Fixed a bug in the TadsObject intrinsic class that sometimes
4311
caused a given property to appear more than once in the getPropList()
4312
method's returned list.  Any given property now appears at most once
4313
in the result list.
4314
4315
<li>The TadsObject intrinsic class now supports createInstance() as a
4316
static method on the intrinsic class.  The expression
4317
TadsObject.createInstance() returns a new instance of TadsObject,
4318
which is the same as defining an object statically like so: "myobj:
4319
object;" - that is, using the "object" keyword rather than a
4320
superclass list.
4321
4322
<li>Fixed a bug in the getPropList() method when called on any
4323
intrinsic class object (e.g., Object, TadsObject, BigNumber).  In
4324
the past, this method returned a list of all of the methods that
4325
were valid on <i>instances</i> of the intrinsic class, not the
4326
methods that were necessarily valid on the intrinsic class object
4327
itself.  This method now returns a list consisting only of the
4328
"static" methods of the intrinsic class, which is to say the methods
4329
that can be called directly on the intrinsic class object itself.
4330
4331
<li>Fixed a bug in the Object intrinsic class's propType() method.
4332
When the property in question was undefined, the method returned
4333
TYPE_NIL, whereas it should have returned nil.  The method now
4334
returns nil for these cases, as documented.
4335
4336
<li>Fixed a bug in the compiler that caused incorrect code generation
4337
when a variable argument list parameter variable was referenced from
4338
within an anonymous function within the function or method with the
4339
variable argumetn list parameter.
4340
4341
<li>The compiler now specifially flags code using '=' to define a
4342
method.  Since this was valid TADS 2 syntax, and has been
4343
gratuitously changed in TADS 3, users are likely to use the old
4344
syntax accidentally, especially while transitioning to the new
4345
language.  The compiler catches these cases so that it can generate
4346
specific and clear error messages; this should help ease the
4347
transition to the new syntax by spelling out plainly the new
4348
syntax requirement.
4349
4350
</ul>
4351
4352
<!------------------------------------------------------------------------>
4353
<h3>Changes for 08/12/2001</h3>
4354
4355
<ul>
4356
4357
<li>Fixed a compiler problem that caused incorrect code to be generated
4358
for expressions of the form <tt>obj.(prop)(args)</tt>, where <tt>prop</tt>
4359
is a property of <tt>self</tt> whose value is a property pointer.
4360
An expressions of this form is equivalent to the form
4361
<tt>obj.(self.prop)(args)</tt>, but the compiler in the past incorrectly
4362
interpreted this as equivalent to <tt>obj.prop(args)</tt> - that is,
4363
rather than evaluating <tt>(self.prop)</tt> and then calling the
4364
property of <tt>obj</tt> given by the resulting property pointer value
4365
with the given argument list <tt>args</tt>,
4366
the compiler generated code that called the property <tt>prop</tt>
4367
of <tt>obj</tt> with arguments <tt>args</tt>.  This has been corrected -
4368
the compiler now correctly interprets <tt>obj.(prop)(args)</tt>
4369
as equivalent to <tt>obj.(self.prop)(args)</tt>.
4370
4371
<li>Fixed a compiler problem that caused incorrect code to be generated
4372
for <tt>delegated</tt> expressions involving variable argument lists.
4373
4374
<li>Fixed a compiler problem that caused a spurious warning under
4375
certain circumstances.  If a property was used only in an address
4376
expression ("&amp;prop") in a module, and no object ever defined
4377
a value for the property, a call to the property in a separate
4378
module incorrectly generated a warning indicating a call to a
4379
possibly undefined property name.  This warning was spurious because
4380
the use of the property name in an address expression is enough to
4381
definitively establish the symbol as a property.
4382
4383
<li>Fixed an output formatter problem that caused the text-mode
4384
interpreter to hang (in an infinite loop internally) in response to
4385
certain "&amp;" entities in HTML mode.
4386
4387
<li>Fixed a problem in the GrammarProd intrinsic class that caused
4388
productions that matched zero tokens to indicate invalid token index
4389
values for firstTokenIndex and lastTokenIndex.  These now always
4390
indicate zero in such case, to indicate that the production is
4391
associated with no tokens.
4392
4393
</ul>
4394
4395
4396
<!------------------------------------------------------------------------>
4397
<h3>Changes for 08/05/2001</h3>
4398
4399
<ul>
4400
4401
<li>Added file safety level checking to the File intrinsic class.  The
4402
initial implementation of File did not check the safety level set in the
4403
user preferences; the File class now correctly checks to ensure each
4404
open-file operation is allowed by the user's safety level settings.
4405
On a safety level violation, the "open" functions throw the new
4406
exception FileSafetyException.
4407
4408
<li>Text files can now be opened in FileAccessReadWriteKeep and
4409
FileAccessReadWriteTrunc modes.  In the past, only "data" and "raw"
4410
files could be opened in read/write modes, which made it impossible
4411
to append to an existing text file.
4412
4413
</ul>
4414
4415
4416
<!------------------------------------------------------------------------>
4417
<h3>Changes for 07/22/2001</h3>
4418
4419
<ul>
4420
4421
<li>Fixed a problem with using 'modify' with intrinsic classes.  In the
4422
past, if more than one 'modify' statement was applied to an intrinsic
4423
class, only the last of the 'modify' statements was actually taken into
4424
account at run-time.  This has been corrected.
4425
4426
<li>Fixed a compiler bug: the compiler did not report an error if a
4427
'replace' statement replaced an object but did not specify a superclass
4428
list for the new object.  The compiler misinterpreted such a statement as
4429
a new anonymous object definition.  This has been corrected; the compiler
4430
now flags the missing superclass list as an error.
4431
4432
</ul>
4433
4434
<!------------------------------------------------------------------------>
4435
<h3>Changes for 07/16/2001</h3>
4436
4437
<ul>
4438
4439
<li>Fixed a problem in the List class that could cause an object to
4440
be improperly deleted by the garbage collector under certain obscure
4441
circumstances.  (In particular, if an object was being assigned to
4442
a list element, and the garbage collector ran in the course of the
4443
creation of the new list for the result of the assignment, the object
4444
on the right-hand side of the assignment was lost if not otherwise
4445
referenced.)
4446
4447
<li>Fixed a problem that occurred with <tt>propDefined(prop,
4448
PROPDEF_GET_CLASS)</tt> when the property of interest was an
4449
intrinsic method (i.e., a TYPE_NATIVE_CODE value).  In these cases,
4450
the return value of the method was an invalid value, which caused
4451
problems if used, including interpreter crashes.  In such cases,
4452
<tt>propDefined()</tt> now properly returns the intrinsic class
4453
object where the intrinsic method is defined.
4454
4455
<li>Extended the <a href="sysman/objdef.htm">object template</a>
4456
mechanism to allow class-specific templates to be defined.
4457
4458
<li>Extended the <a href="sysman/tadsgen.htm">firstObj()</a> and 
4459
<a href="sysman/tadsgen.htm">nextObj()</a> intrinsic functions to
4460
take a new <i>flags</i> argument, which allows the caller to specify
4461
whether to enumerate instances only, classes only, or both.
4462
4463
<li>Changed the TadsObject class to allow use of the <tt>new</tt>
4464
operator with no arguments.  In the past, at least one argument
4465
(giving the immediate superclass of the new object) was required;
4466
now a <tt>new TadsObject</tt> with no arguments is understood to
4467
create a base TadsObject.
4468
4469
<li>Added the <a href="sysman/file.htm">File intrinsic class</a>, which
4470
provides a new interface to external file input/output.  This replaces
4471
the file-related functions in the <a href="sysman/tadsio.htm">"tads-io"
4472
intrinsic function set</a>, which have been removed.  Specifically,
4473
the following functions have been removed:
4474
  <ul>
4475
    <li><tt>fileClose</tt>
4476
    <li><tt>fileGetPos</tt>
4477
    <li><tt>fileOpen</tt>
4478
    <li><tt>fileRead</tt>
4479
    <li><tt>fileSeek</tt>
4480
    <li><tt>fileSeekEnd</tt>
4481
    <li><tt>fileWrite</tt>
4482
  </ul>
4483
<b>Important note: This change is not upwardly compatible.</b>  All existing
4484
code must be recompiled for this change, and any code using the fileXxx
4485
functions must be modified to use the new File intrinsic class.  The
4486
necessary code changes are relatively straightforward, since the names
4487
of the new File methods are similar to those of the old functions.
4488
4489
<li>The compiler now generates an implicit constructor for each 
4490
object or class that inherits from multiple base classes and does
4491
not provide an explicit constructor.  The implicit constructor
4492
simply invokes each base class's constructor, in the same order
4493
in which the base classes are listed in the superclass list.
4494
4495
<li>Added grouped sub-alternatives to rules in the 
4496
<a href="sysman/gramprod.htm"><tt>grammar</tt> statement</a>.  This allows
4497
portions of an alternative in a rule definition to be grouped for
4498
alternation; for example, a rule can be defined as
4499
"<tt>('take' | 'get' | 'pick' 'up') nounList-&gt;lst_</tt>", which
4500
is more concise than flattening out the grouped alternation manually.
4501
4502
<li>Added the <a href="sysman/preproc.htm"><tt>#ifempty</tt> and
4503
<tt>#ifnempty</tt></a> variable-arguments expansion operators,
4504
which allow conditional expansion in a varargs macro depending on
4505
whether or not the varargs part is empty.
4506
4507
<li>Added the -P option to t3make: this preprocesses the source file,
4508
writing the expanded results on standard output.  When -P is
4509
specified, no compilation or linking is performed, so no object or
4510
image files are created.
4511
4512
<li>Added new <a href="sysman/string.htm">String intrinsic class</a>
4513
methods: <tt>startsWith()</tt>, <tt>endsWith()</tt>, and
4514
<tt>mapToByteArray</tt>.
4515
4516
<li>Added a feature to the <tt>substr()</tt> method of the
4517
<a href="sysman/string.htm">String intrinsic class</a>: if the starting
4518
index (the first argument) is negative, it indicates an offset
4519
from the end of the string: -1 is the last character of the string,
4520
-2 the second-to-last, and so on.
4521
4522
<li>Added a new function to the <a href="sysman/tadsio.htm">"tads-io" function
4523
set</a>: <tt>getLocalCharSet</tt>, which returns the name of one of the
4524
active local character sets on the current system.
4525
4526
<li>Added new functionality to the <a href="sysman/tadsio.htm">"tads-io"
4527
function set</a> for files.  Files can now be opened in "raw" mode,
4528
which allows reading and writing byte arrays.  Bytes written to and
4529
read from a file in raw mode are not translated or modified in any
4530
way; this mode offers direct access to external files, for purposes
4531
such as manipulating files in formats defined by other applications.
4532
The <tt>fileRead()</tt> and <tt>fileWrite()</tt> functions in this
4533
mode take ByteArray arguments.
4534
4535
<li>Added new functionality to the <a href="sysman/tadsio.htm">"tads-io"
4536
function set</a>: the <tt>fileOpen()</tt> routine can now take an
4537
object of intrinsic class <a href="sysman/charset.htm">CharacterSet</a>
4538
instead of a character set name.  If you've already instantiated
4539
a CharacterSet object for other reasons, it is more efficient to
4540
re-use the same object by reference in this manner than to pass
4541
the name of the character set to <tt>fileOpen()</tt>, since 
4542
<tt>fileOpen()</tt> has to create another mapping object when
4543
given only a character set name.
4544
4545
<li>Added the new <a href="sysman/charset.htm">CharacterSet</a> intrinsic
4546
class.
4547
4548
<li>Added the new <a href="sysman/bytearr.htm">ByteArray</a> intrinsic
4549
class.
4550
4551
<li>In the <a href="sysman/objic.htm">Object intrinsic class</a>, method
4552
formerly known as <tt>isClass()</tt> has been renamed to
4553
<tt>ofKind()</tt>.  x.ofKind(y) returns true if x is an instance or
4554
subclass or y.  In addition, this method has been changed so that
4555
x.ofKind(x) returns true for any x.
4556
4557
<li>Added a built-in character set mapping for ISO 8859-1 (Latin-1).
4558
This character set is in widespread use because of its status as the
4559
default HTTP character set, and has an especially simple mapping to
4560
Unicode, so it seemed worthwhile to add as a built-in set not requiring
4561
an external mapping file.  The assigned name of the set is "iso-8859-1".
4562
4563
<li>Changed the compiler's former <tt>-r</tt> option to <tt>-a</tt>,
4564
and the former <tt>-rl</tt> to <tt>-al</tt>.  (The <tt>-a</tt> option
4565
forces recompilation of all involved modules even when not out of
4566
date with respect to the source files, and <tt>-al</tt> forces
4567
relinking even when the image file isn't out of date with respect
4568
to the object files; these options effectively override the compiler's
4569
normal dependency analysis for cases when the automatic analysis is
4570
incorrect for some reason.)  This change is gratuitous and cosmetic,
4571
but makes the compiler's option names more closely resemble that of
4572
traditional "make" programs.
4573
4574
<li>Fixed a compiler bug: the compiler reported a spurious "symbol
4575
already defined" warning when a particular grammar production had
4576
rules defined in multiple modules.  This has been corrected.
4577
4578
<li>Fixed a preprocessor bug: if the argument of a #message was
4579
missing its closing right parenthesis, the preprocessor got stuck
4580
in an infinite loop.  This has been corrected.
4581
4582
<li>Fixed a bug in the <a href="sysman/vector.htm">Vector intrinsic
4583
class</a> (and, by inheritance, in the Array intrinsic class): if the
4584
<tt>insertAt</tt> method was called on an empty vector, a crash
4585
occurred.  This has been corrected.
4586
4587
<li>Fixed a compiler bug that caused the compiler to crash if
4588
confronted with a <tt>foreach</tt> statement in the absence of
4589
the definition of the Collection and Iterator classes.  This
4590
has been corrected; the compiler now generates the appropriate
4591
error message and recovers gracefully.
4592
4593
<li>Fixed a problem with the grammar production object that caused
4594
new match tree objects to bypass constructors on creation.  The
4595
match tree constructors are now invoked as for any other object
4596
instantiation.
4597
4598
<li>Fixed a problem in the debugger that prevented the debugger from
4599
taking control on a run-time exception being thrown when another
4600
run-time exception had previously occurred at the same place twice in
4601
a row with no intervening debugger activity.
4602
4603
<li>Fixed a problem that caused the debugger to crash under some
4604
unusual conditions when an entry in the local-variables window
4605
was selected and later automatically removed due to an execution
4606
context change.
4607
4608
<li>Improved the robustness of the debugger when the program
4609
being debugged caused a stack-overflow exception.
4610
4611
<li>Updated the calc.t example to the new GrammarProd.parseTokens()
4612
interface.
4613
4614
<li>Fixed a bug that caused comparisons of any two function pointers
4615
to yield unequal, even for equivalent function pointers.  This bug
4616
had numerous subtle manifestations; for example, a function pointer
4617
key in a LookupTable could never be found, since a test for equality
4618
to the key would never succeed.
4619
4620
<li>Fixed a compiler bug that caused the incorrect error message to
4621
be reported when a replace/modify of an extern object was out of order
4622
in a link (the message reported that a function rather than object
4623
was involved).
4624
4625
<li>Removed a spurious warning that was generated when a dictionary
4626
was imported from multiple symbol files.
4627
4628
<li>Fixed a bug in the GrammarProd intrinsic class that caused "*"
4629
tokens in subproductions to be misinterpreted.  In the past, the "*"
4630
token only worked properly in top-level productions (i.e., a production
4631
on which parseTokens() was called); this has been corrected so that "*"
4632
works properly at any level.
4633
4634
</ul>
4635
4636
4637
<!------------------------------------------------------------------------>
4638
<h3>Changes for 05/05/2001</h3>
4639
4640
<ul>
4641
4642
<li><b>Incompatible intrinsic class API change:</b> The return value
4643
of the <tt>parseTokens()</tt> method in the <a
4644
href="sysman/gramprod.htm">GrammarProd intrinsic class</a> has been changed.
4645
In the past, this method returned a list, each of whose elements was
4646
a sublist of two elements.  Each sublist described one successful
4647
match tree; the first element of each sublist was the number of
4648
tokens matched, and the second was the root object of the match tree.
4649
The 4/29/2001 version added the firstTokenIndex and lastTokenIndex
4650
properties to the match objects; since the number of tokens matched
4651
in a tree can be inferred from the firstTokenIndex and lastTokenIndex
4652
values, the token counts in the return sublists were redundant.
4653
Therefore, to simplify the API, the sublists have been eliminated,
4654
and <tt>parseTokens()</tt> now returns simply a list of match tree
4655
root objects.  To obtain the token count for a match, simply calculate
4656
<tt>(match.lastTokenIndex - match.firstTokenIndex - 1)</tt>, where
4657
<tt>match</tt> is the root object in the match tree.  Since the root
4658
object in a tree encompasses the entire match, its token range
4659
necessarily encompasses the range of tokens for the entire match.
4660
4661
<li>Added <a href="sysman/preproc.htm">variable-argument macros</a>.
4662
4663
<li>Fixed a problem in the <a href="sysman/gramprod.htm">GrammarProd intrinsic
4664
class</a> that prevented a rule from being matched when it ended with
4665
the special '*' token and was used as a subproduction in another rule.
4666
This now works correctly.
4667
4668
<li>Fixed a problem in the compiler that caused a spurious warning
4669
message indicating that a dictionary symbol had been imported multiple
4670
times.  This warning was generated whenever the dictionary was declared
4671
in more than one source file but not in <i>all</i> source files; each
4672
file that did <i>not</i> declare the dictionary displayed the warning.
4673
This has been corrected.
4674
4675
<li>Added the <a href="sysman/expr.htm"><tt>delegated</tt> keyword</a>,
4676
which allows delegating a method call to an unrelated object.
4677
4678
<li>Added the <a href="sysman/tadsgen.htm"><tt>getMethodDefiner()</tt>
4679
intrinsic function</a>, which returns the object that defines the currently
4680
executing method.
4681
4682
<li>Changed the default name of the ASCII character set mapping to
4683
"us-ascii" for better readability.  The old name ("asc7dflt") is still
4684
accepted, but is now obsolescent and should not be used in new code.
4685
All of the #charset directives in the system headers provided with the
4686
compiler have been updated to use the new "us-ascii" name.
4687
4688
</ul>
4689
4690
<!------------------------------------------------------------------------>
4691
<h3>Changes for 04/29/2001</h3>
4692
4693
<ul>
4694
4695
<li>Fixed a problem in the <a href="sysman/gramprod.htm">GrammarProd intrinsic
4696
class</a> that caused incorrect results to be returned with
4697
productions that matched exactly zero tokens.
4698
4699
<li>Extended the <tt>grammar</tt> syntax to allow the "<tt>-&gt;</tt>"
4700
notation to be used with literal tokens.  In the past, the arrow was
4701
only allowed with symbol-match tokens (subproductions and token classes),
4702
but it is often desirable to be able to retrieve the matching token even
4703
for a literal match.  There are two cases in particular where a literal's
4704
matching token is needed to reconstruct the original input: when the
4705
literal is matched with truncation; and when a production has several
4706
alternatives with different literals.
4707
4708
<li>Modified the <a href="sysman/gramprod.htm">GrammarProd intrinsic class</a>
4709
so that each match object now includes more direct information on the
4710
tokens involved in the match.  The parser now sets the
4711
firstTokenIndex and lastTokenIndex properties of each match object to
4712
indicate the index of the first token and of the last token,
4713
respectively, that are involved in matching the rule corresponding to
4714
the match object.  This is a simple range, so all of the tokens from
4715
the first to the last, inclusive, constitute the match's original
4716
text.  In addition, the parser sets the tokenList property of each
4717
match tree item to the original token list passed into parseTokens()
4718
(this doesn't take up nearly as much memory as it might at first
4719
appear, since all of the match objects reference a single shared copy
4720
of the token list).  The exported properties firstTokenIndex,
4721
lastTokenIndex, and tokenList are defined in gramprod.h.
4722
4723
<li>The compiler now creates a dictionary entry in the default
4724
dictionary, if one is defined, for each literal string that appears
4725
in a <a href="sysman/gramprod.htm">"grammar"</a> statement's rule list.  If no
4726
default dictionary is defined when a "grammar" statement is
4727
encountered, the statement's literals are not entered into any
4728
dictionary.  Each literal string is associated with the production
4729
object and the property "miscVocab".  Since these strings are now
4730
stored in the dictionary, it is simple to determine if a word is
4731
defined in any context; without the grammar literal dictionary
4732
entries, it was not possible to determine if a given string, when
4733
entered by a user at run-time, was known in the context of a grammar
4734
literal.
4735
4736
<li>The <a href="sysman/gramprod.htm">"grammar"</a> syntax has been extended
4737
to allow a "tag" to be associated with each "grammar" statement.  To
4738
specify a tag, specify any symbol or number in parentheses after the
4739
production name.  For example:
4740
4741
<p>
4742
<pre>
4743
    grammar nounPhrase(1): adjective->adj_ : object ;
4744
</pre>
4745
4746
<p>The tag's only purpose is to provide an identifying name for the
4747
new "grammarInfo" method, described below.
4748
4749
<li>The compiler now automatically creates a method for each
4750
<a href="sysman/gramprod.htm">grammar</a> match object that makes it possible to
4751
traverse match trees without knowing their internal structure in
4752
advance.  The new method is called "grammarInfo," and it returns a
4753
list.  The list's first element is a string giving the name of the
4754
production, with the optional tag (see above) enclosed in parentheses
4755
after the production's symbolic name.  Each subsequent element is the
4756
value of a property appearing after an arrow ("-&gt;") in the production's
4757
rule list.
4758
4759
<li>Modified the <a href="sysman/gramprod.htm">grammar</a> production matching
4760
algorithm so that [badness] matches are examined as a group rather
4761
than individually.  In particular, when a number of [badness]
4762
alternatives arise simultaneously, the parser had in the past
4763
examined only one such alternative at a time once determining that no
4764
better matches were available.  Now, all [badness] alternatives with
4765
the lowest badness value are examined in parallel.  This is important
4766
in some cases for the same reasons that parallel consideration of
4767
regular alternatives is necessary.
4768
4769
<li>Fixed a compiler problem that caused spurious "variable assigned
4770
but not used" warnings in certain situations.  In particular, if a
4771
local variable was defined in a nested scope within a method, and the
4772
variable was used only within the lexical confines of an anonymous
4773
function within the nested scope, the compiler did not correctly mark
4774
the variable as having been used and thus incorrectly reported the
4775
warning.  This problem did not affect code generation; its only
4776
effect was the unnecessary warning.
4777
4778
<li>Enhanced the Dictionary intrinsic class's findWord() and
4779
findWordTrunc() methods so that the property argument in each can be
4780
omitted or specified as nil, in which case all objects with vocabulary
4781
matching given text, for any part-of-speech property, will be
4782
returned.
4783
4784
<li>Fixed a debugger problem that caused a crash in some obscure
4785
cases involving opening a file during a debugger session when the
4786
debugger had never taken control since the beginning of program
4787
execution, and a similar problem that occurred when the VM threw
4788
a run-time error exception under similar circumstances.
4789
4790
</ul>
4791
4792
<!------------------------------------------------------------------------>
4793
<h3>Changes for 04/15/2001</h3>
4794
4795
<ul>
4796
4797
<li>A new mechanism allows capturing calls to undefined methods and
4798
properties.  When a call is made to an undefined method, the VM now
4799
calls a new property, <tt><a href="sysman/undef.htm">propNotDefined()</a></tt>,
4800
on the target object.  The new method receives as arguments the
4801
the undefined property ID and the arguments to the original method
4802
call.  If <tt>propNotDefined</tt> is itself not defined, the VM
4803
simply returns nil for the undefined method call, as it did in the
4804
past.
4805
4806
<li>Added some new <a href="sysman/regex.htm">regular expression</a> features:
4807
<ul>
4808
   <li>Character classes can now be combined with '|', as in
4809
       &lt;upper|digit&gt; (matches any upper-case letter or any digit).
4810
   <li>Character classes can now be complemented with '^', as in
4811
       &lt;^upper&gt; (matches anything <i>except</i> upper-case letters).
4812
   <li>Added some <a href="sysman/regex.htm">named character
4813
       expressions</a>, which look similar to character-class expressions,
4814
       and which can be combined with character-class expressions via
4815
       '|': &lt;upper|star&gt; matches any upper-case letter or an asterisk.
4816
</ul>
4817
4818
<li>Renamed the t23run.exe executable to simply tr32.exe, so the
4819
combined TADS 2+3 interpreter is now the default interpreter.  The
4820
separate interpreters are now called t2r32.exe (for TADS 2) and
4821
t3run.exe (for TADS 3).  For the most part, users will not need to
4822
run the version-specific interpreters at all; the only time these
4823
should be needed is when bundling a game into an executable, in which
4824
case it is desirable for the sake of minimizing file sizes to include
4825
only the version of the interpreter actually needed.
4826
4827
</ul>
4828
4829
<!------------------------------------------------------------------------>
4830
<h3>Changes for 3/28/2001</h3>
4831
4832
<ul>
4833
4834
<li>The object definition syntax has been extended to allow an object's
4835
property list to be enclosed in braces.  Refer to the 
4836
<a href="sysman/objdef.htm">Object Definitions documentation</a> for details.
4837
4838
<li>The object definition syntax now provides <a
4839
href="sysman/objdef.htm">"nested" objects</a>.  A nested object
4840
is an anonymous object defined in-line within another object, with a
4841
property of the enclosing object initialized with a reference to the
4842
nested object; this syntax is convenient for defining certain types
4843
of small helper objects.
4844
4845
<li>The language now has a <a href="sysman/objdef.htm">static property
4846
initialization</a> syntax, which allows a property to be initialized with
4847
a non-constant value computed at compile-time.
4848
4849
<li>Changed the behavior of the '+' property.  The new behavior is
4850
much simpler than the previous behavior: if an object is defined
4851
with <i>N</i> plus signs, its '+' property is initialized to the
4852
most recent object defined with <i>N</i>-1 plus signs.  Explicitly
4853
setting the '+' property in an object list is now irrelevant.
4854
Refer to the <a href="sysman/objdef.htm">documentation</a> for details.
4855
4856
<li>Changed the default filename suffix for image files to ".t3" (it
4857
was formerly ".t3x") to make image filenames somewhat more friendly looking.
4858
4859
<li>Added the new executable "t23run" - this is a 32-bit console-mode
4860
combined TADS 2 and TADS 3 interpreter.  You can use this single
4861
application to run games compiled for TADS 2 or TADS 3.  This version
4862
of the interpreter is <i>not</i> designed for bundling single-file
4863
games for distribution, since this would unnecessarily increase the
4864
size of bundled games; use the appropriate single-version interpreter
4865
executable for bundling.
4866
4867
<li>Added the new executable "html23" - this is a combined TADS 2 and
4868
TADS 3 version of the HTML interpreter.
4869
4870
<li>For anyone interested in porting the combined command-line
4871
interpreter on another platform, the code that implements this should
4872
be easily portable to other command-line operating systems.  See
4873
the target 't23run.exe' in win32/makefile.vc5; you can find the source
4874
code for the main program entrypoint in vmcl23.cpp.  For systems that
4875
don't use Unix-style command lines, the command line code itself won't
4876
be portable, but portable code for sensing the engine version
4877
needed to run a given game file can be found in vmmain.cpp.
4878
4879
<li>Fixed a bug that caused problems with certain "reflection"
4880
methods when the program used <tt>modify</tt> to extend the
4881
<tt>TadsObject</tt> intrinsic class.  If the program modified
4882
<tt>TadsObject</tt>, then traversed the object tree (using the
4883
<tt>getSuperclassList()</tt> method), or used the
4884
<tt>propDefined()</tt> method, the behavior was incorrect, and could
4885
lead to VM crashes.  This has been corrected.
4886
4887
<li>Added <a href="sysman/charmap.htm">documentation</a> on the <tt>#charset</tt>
4888
directive and using source files encoded in Unicode UCS-2.
4889
4890
<li>Added a <tt>#charset "asc7dflt"</tt> directive to each system
4891
source and header file included with the compiler distribution.  This
4892
directive ensures that the compiler interprets the contents of the system
4893
files correctly, in case the user wants to specify a default character
4894
set for the compilation with the <tt>-cs</tt> compiler option.
4895
4896
<li>The compiler now accepts Unicode character 0x2028 ("line
4897
separator") as equivalent to a newline in source files that use of
4898
the Unicode encodings the compiler accepts (UCS-2 big-endian, UCS-2
4899
little-endian, or UTF-8).
4900
4901
<li>In text mode, the <tt>fileRead()</tt> function now properly
4902
translates input characters according to the character set selected
4903
when the file was opened.  (In the past, the character set was
4904
ignored, and the characters from the file were not properly
4905
translated to Unicode.)  In addition, the <tt>fileRead()</tt>
4906
function accepts Unicode character 0x2028 (the Unicode line separator
4907
character) as equivalent to a newline (but note that, as always, the
4908
text returned from <tt>readLine()</tt> represents each end-of-line
4909
with a single '\n' character, regardless of the type of line
4910
termination in the underlying file).
4911
4912
</ul>
4913
4914
<!------------------------------------------------------------------------>
4915
<h3>Changes for February 24, 2001</h3>
4916
4917
<ul>
4918
4919
<li>Added the <a href="sysman/t3vm.htm"><tt>t3AllocProp()</tt></a>
4920
intrinsic function, which allocates a new property ID.
4921
4922
<li>Added the <a href="sysman/objic.htm">
4923
<tt>Object.getPropList()</tt></a>
4924
method, which returns a list of properties directly defined by an object.
4925
4926
<li>Added the <a href="sysman/objic.htm">
4927
<tt>Object.getPropParams(<i>prop</i>)</tt></a> method, which returns
4928
information on the parameters taken by a property or method.
4929
4930
<li>Added the <a href="sysman/tadsgen.htm">
4931
<tt>getFuncParams(<i>funcptr</i>)</tt></a> intrinsic function, which
4932
returns information ont he parameters taken by a function.
4933
4934
</ul>
4935
4936
<!------------------------------------------------------------------------>
4937
<h3>Changes for February 10, 2001</h3>
4938
4939
<ul>
4940
4941
<li>The new <a href="sysman/proccode.htm"><tt>property</tt> statement</a>
4942
allows a program to explicitly declare property symbols.  This is optional,
4943
but can be useful in certain cases in library code.
4944
4945
<li>Added the <a href="sysman/lookup.htm">LookupTable intrinsic class</a>,
4946
which implements a general-purpose associative array type.  A LookupTable
4947
is similar to a Vector, but whereas a Vector can use only integers as
4948
indices, a Hashtable can use any value as an index.
4949
4950
<li>Added the new <a href="sysman/reflect.htm"><tt>t3GetGlobalSymbols()</tt></a> 
4951
intrinsic function, which provides programmatic access to the
4952
compile-time names of objects, properties, functions, intrinsic
4953
classes, and enumerators.
4954
4955
<li>The preprocessor now treats square brackets ("[ ]") and braces
4956
("{ }") as grouping symbols when parsing macro arguments.  In the past,
4957
only parentheses were counted.  This allows list constants and anonymous
4958
functions to be used more easily as macro arguments.
4959
4960
<li>In <tt>_main.t</tt>, added a new function, <tt>initAfterLoad()</tt>.
4961
The main program entrypoint in <tt>_main.t</tt> (function <tt>_main()</tt>)
4962
calls this new routine to perform initialization.  This routine sets up
4963
the default display function, performs pre-initialization if necessary,
4964
then performs regular load-time initialization.  All of these operations
4965
were previously carried out in <tt>_main()</tt>; the reason they've been
4966
separated into a new function is to allow the same operations to be called
4967
after a <tt>restartGame</tt> operation.  Since a <tt>restartGame</tt>
4968
effectively re-loads the image file and starts the game over from
4969
scratch, the same initialization that <tt>_main()</tt>
4970
performs at initial load must be performed immediately after a restart;
4971
this function makes this common code easy to re-use.
4972
4973
<li>Added a new method to the TadsObject intrinsic class:
4974
createInstance(), which creates an instance of the object.  This
4975
method passes its arguments to the new object's constructor, if any,
4976
and returns a reference to the new object.
4977
4978
<li>Added <tt>execAfterMe</tt> to <tt>ModuleExecObject</tt> in
4979
<tt>_main.t</tt>.  User code can initialize this property in a given
4980
<tt>ModuleExecObject</tt> instance to contain a list of other
4981
<tt>ModuleExecObject</tt> instances that are to be initialized
4982
<b>after</b> the given instance; this is analogous to the
4983
<tt>execBeforeMe</tt> list, but allows an object to specify things
4984
that are to come after it.  It is sometimes desirable to be able to
4985
specify initialization order dependencies by specifying what must
4986
follow rather than what must precede initialization of a given object,
4987
and this new property provides the flexibility to specify order
4988
dependencies either way.
4989
4990
<li>A makefile for DJGPP (the definitive port of Gnu C/C++ for MS-DOS)
4991
is now included in the source distribution.  This makefile can be used
4992
to create a 32-bit version of the interpreter that will run on MS-DOS
4993
on PC's with 386 or later processors.
4994
4995
<li>Fixed a VM problem that caused modification of the root intrinsic
4996
object (i.e., <tt>modify Object</tt>) to fail.  In the past, the VM
4997
simply failed to execute code added to the root intrinsic object with
4998
<tt>modify</tt>.  This has been corrected; code added to
4999
<tt>Object</tt> is now properly inherited from the other intrinsic
5000
classes.
5001
5002
<li>The String and List intrinsic classes can now be extended with
5003
the <tt>modify</tt> mechanism.  In the past, the VM did not correctly
5004
handle code extensions to the String and List intrinsic classes.
5005
5006
<li>Fixed a compiler bug that caused incorrect code generation 
5007
when adding a constant zero value to a local variable which, at run-time,
5008
ends up containing a vector, list, or other non-integer value.
5009
5010
<li>The Vector intrinsic class can now be used with the <tt>foreach</tt>
5011
keyword to loop over the elements in a vector.  (In previous versions,
5012
the Vector class incorrectly omitted support for <tt>foreach</tt>.)
5013
5014
<li>The "Frames" version of the documentation should now work
5015
correctly with Netscape and other browsers that had trouble with past
5016
versions.  (The frames page had some ill-formed HTML, which some
5017
browsers rejected, but this page has now been corrected.)
5018
5019
<li>Changed the text of the VM error message that results from
5020
applying an index to a type that cannot be indexed (nil[3], for
5021
example).  In the past, the message read "invalid type for indexing -
5022
value cannot be index," which incorrectly signified that there was
5023
something wrong with the index value, when in fact the value being
5024
indexed was the problem.  The message has been changed to read
5025
"invalid index operation - this type of value cannot be indexed."
5026
5027
<li>Fixed a problem in the Vector intrinsic class that caused
5028
a vector's data to be corrupted by certain operations that should have,
5029
but did not, increase the internal storage space allocated for the
5030
Vector object.
5031
5032
<li>Fixed a compiler problem with object templates.  The compiler
5033
did not properly parse object templates that included list tokens;
5034
this has been corrected.
5035
5036
<li>Fixed a bug in the <tt>rand()</tt> intrinsic function.  In the
5037
past, this function crashed the interpreter if the argument was a
5038
list with no elements.  This has been corrected; the function now
5039
returns <tt>nil</tt> when the argument is a list with no elements.
5040
5041
<li>Fixed a problem with the <tt>Vector</tt> intrinsic class that
5042
caused pre-initialized data to be loaded incorrectly.
5043
5044
<li>Corrected the documentation (the <a href="sysman/expr.htm">expressions
5045
chapter</a>) to reflect the correct precedence of the "<tt>[]</tt>" and
5046
"<tt>.</tt>" operators, which should be above the unary operators.
5047
5048
<li>Added four new methods to the <a href="sysman/list.htm">List intrinsic
5049
class</a>: <tt>prepend(<i>val</i>)</tt>, which inserts a new value at
5050
the start of a list; <tt>insertAt(<i>index, val1, val2, ...</i>)</tt>,
5051
which inserts one or more values into a list at a given position;
5052
<tt>removeElementAt(<i>index</i>)</tt>, which deletes the element
5053
at the given index; and <tt>removeRange(<i>startIndex, endIndex</i>)</tt>,
5054
which removes the elements in the given range of indices.
5055
5056
<li>Added a new method to the <a href="sysman/vector.htm">Vector intrinsic
5057
class</a>: <tt>prepend(<i>val</i>)</tt>, which inserts a new value at
5058
the start of a vector.
5059
5060
<li>It is no longer legal to apply the unary "<tt>&amp;</tt>"
5061
operator to an object symbol.  In the past,
5062
"<tt>&amp;<i>objectName</i></tt>" was the same as simply
5063
"<tt><i>objectName</i></tt>"; this is no longer legal.
5064
"<tt>&amp;<i>objectName</i></tt>" was never a meaningful construct,
5065
since an object symbol yields a reference to the object to begin
5066
with, but past versions of the compiler accepted it without complaint
5067
and treated it as equivalent to the unadorned object symbol; the
5068
compiler now rejects this construct.
5069
5070
<li>It is no longer legal to apply the unary "<tt>&amp;</tt>"
5071
operator to a function name symbol.  In the past,
5072
"<tt>&amp;<i>functionName</i></tt>" yielded a reference to the
5073
function.  This has been changed so that the function name used
5074
by itself yields a reference to the function, just as an object
5075
name does.
5076
5077
<li>Because the "<tt>&amp;</tt>" operator can no longer be used with
5078
any symbol types other than properties, there is no longer a warning
5079
when using the operator with an otherwise undefined symbol name.
5080
"<tt>&amp;<i>symbol</i></tt>" now unambiguously defines the symbol
5081
as a property name.
5082
5083
<li>Fixed a compiler bug that caused a spurious warning message when
5084
compiling certain types of expressions involving property pointers.
5085
The warning did not affect code generation, but it was incorrect and
5086
has been removed.
5087
5088
</ul>
5089
5090
<!------------------------------------------------------------------------>
5091
<h3>Changes for version 3.0.2 (September 27, 2000)</h3>
5092
5093
<ul>
5094
5095
<li>Fixed a compiler problem that caused the compiler to go into an
5096
infinite loop (and therefore freeze up) when confronted with a 'switch'
5097
statement containing code before the first 'case' or 'default' label.
5098
This has been corrected; the compiler now reports an error (such code
5099
is unreachable) and continues with the compilation.
5100
5101
<li>Fixed a minor compiler problem that generated a spurious warning
5102
message in a certain situation.  Specifically, if none of a 'switch'
5103
statement's 'case' labels led to code paths that could reach the next
5104
statement after the 'switch' (for example, if every code path
5105
reachable from a 'case' label led to a 'return' statement), but the
5106
'switch' had no 'default' label, the compiler generated the warning
5107
message "unreachable statement" at the next executable statement
5108
after the 'switch'.  This warning was incorrect because, in most
5109
cases, it is not safe to assume that every possible value of a
5110
switch's controlling expression is included in the list of explicit
5111
cases, hence the next statement following a 'switch' with no
5112
'default' is reachable any time the controlling expression's value is
5113
not in the list of explicit 'case' labels.  Note that this problem
5114
merely caused the spurious warning and did not affect code
5115
generation.
5116
5117
</ul>
5118
5119
<!------------------------------------------------------------------------>
5120
<h3>Changes for June 24, 2000</h3>
5121
5122
<ul>
5123
5124
<li>Fixed a compiler problem with try/catch statements.  The compiler
5125
did not correctly generate handlers for any catch block past the
5126
first for a given try statement; this has been corrected.
5127
5128
</ul>
5129
5130
<!------------------------------------------------------------------------>
5131
<h3>Changes for version 3.0.1 (June 17, 2000)</h3>
5132
5133
<ul>
5134
5135
<li>The meaning of the syntax <tt>x.y</tt> and <tt>&amp;y</tt> have
5136
changed slightly, in a way that will be transparent to most code.
5137
In the past, if <tt>y</tt> was a local variable, then <tt>x.y</tt>
5138
evaluated the local, then called the method on <tt>x</tt> specified
5139
by the property pointer value in the local; <tt>&amp;y</tt> simply
5140
generated a compilation error because a local's address cannot be
5141
evaluated.  This behavior has changed.  Now, <tt>x.y</tt> and
5142
<tt>&amp;y</tt> both ignore the local definition of <tt>y</tt> and
5143
interpreter <tt>y</tt> as a property name.  This change is important
5144
because it allows code to refer to a property explicitly, even when
5145
a local of the same name has been defined in the code block.  For
5146
example:
5147
5148
<p>
5149
<pre>
5150
   myObject: object
5151
     obj = nil
5152
     setObj(obj) { self.obj = obj; }
5153
   ;
5154
</pre>
5155
<p>
5156
In the past, the code above would have had to use a different name
5157
for the formal parameter variable <tt>obj</tt>, because it would not
5158
have been able to refer to the property of the same name.  With the
5159
new interpretation, the code can distinguish between the local and
5160
the property by referring to the property explicitly using <tt>self.obj</tt>.
5161
5162
<p>Note that it is still simple to obtain the old behavior of
5163
evaluating the local variable and calling a method via the resulting
5164
property pointer.  To do this, simply enclose the local in
5165
parentheses: <tt>x.(y)</tt>.
5166
5167
</ul>
5168
5169
<!------------------------------------------------------------------------>
5170
<h3>Changes for 5/21/2000</h3>
5171
5172
<ul>
5173
5174
<li>Add a new <a href="sysman/vector.htm">Vector</a> intrinsic class, a subclass
5175
of Array that combines the reference semantics of an Array with the
5176
dynamic sizing capabilities of a List.  Vector is substantially more
5177
efficient than List when constructing a collection iteratively.
5178
5179
<li>Added some new List methods:
5180
<a href="sysman/list.htm">sort</a>,
5181
<a href="sysman/list.htm">append</a>,
5182
<a href="sysman/list.htm">appendUnique</a>.
5183
5184
<li>Added new Array methods: sort, appendUnique.
5185
5186
<li>Added an <a href="sysman/errtrans.htm">error message translation
5187
mechanism</a>, which allows non-English versions of the interpreter's
5188
and compiler's error messages to be substituted at run-time.
5189
Messages can be loaded from an external file, so there is no need to
5190
recompile the system to switch languages.  (At the moment, of course,
5191
only an English set of messages actually comes with the system, but
5192
it is hoped that a few translated versions will be contributed so
5193
that more languages will be supported "out of the box" in the future.)
5194
5195
<li>Fixed a bug that reversed the order of arguments in calls to
5196
anonymous functions while running in the debugger.
5197
5198
</ul>
5199
5200
<!------------------------------------------------------------------------>
5201
<h3>Changes for 5/11/2000</h3>
5202
5203
<ul>
5204
5205
<li>Changed the name of the <tt>say</tt> function in the "tads-io"
5206
intrinsic function set to <a
5207
href="sysman/tadsio.htm"><tt>tadsSay</tt></a>.  This allows the
5208
library to define its own higher-level function called <tt>say</tt>;
5209
since user code should almost always call the library's function
5210
rather than the low-level direct console output function, it is
5211
desirable to give the library version the shorter, more convenient
5212
name.
5213
5214
<li>Added the <tt>appendUnique()</tt> method to the <a
5215
href="sysman/list.htm">List</a> and Array intrinsic classes.
5216
5217
</ul>
5218
5219
<!------------------------------------------------------------------------>
5220
<h3>Changes for 4/24/2000</h3>
5221
5222
<ul>
5223
5224
<li>Fixed a bug in the compiler that caused lost properties on objects
5225
under certain very complicated circumstances (the problem occurred when
5226
dictionaries and other objects were defined in a particular order).
5227
5228
</ul>
5229
5230
<!------------------------------------------------------------------------>
5231
<h3>Changes for 4/22/2000</h3>
5232
5233
<ul>
5234
5235
<li>Added the <a href="sysman/proccode.htm"><tt>foreach</tt> statement</a>.
5236
5237
<li>Added the <a href="sysman/collect.htm">Collection</a> and <a
5238
href="sysman/iter.htm"> Iterator</a> classes.  <a
5239
href="sysman/list.htm">List</a> and Array are now subclasses of
5240
Collection, so these classes can create Iterator objects to visit
5241
their elements.
5242
5243
<li>The Windows HTML interpreter now supports PNG transparency (this is
5244
a generic change to the Windows HTML renderer that will also be in
5245
HTML TADS 2.5.4).  Note that only simple transparency is supported;
5246
full alpha blending is still not supported.  PNG transparency now has
5247
its own systemInfo() capability code, SYSINFO_PNG_TRANS.
5248
5249
</ul>
5250
5251
<!------------------------------------------------------------------------>
5252
<h3>Changes for 4/16/2000</h3>
5253
5254
<ul>
5255
5256
<li>Fixed a bug that caused a compiler crash when a source 
5257
file was completely empty (or contained only comments).
5258
5259
<li>Fixed a bug that caused a compiler crash in certain situations
5260
involving multiple initializers in a single 'local' statement.
5261
5262
</ul>
5263
5264
<!------------------------------------------------------------------------>
5265
<h3>Changes since 3.0.0</h3>
5266
5267
<ul>
5268
5269
<li>Added the <a href="sysman/string.htm">htmlify()</a> method to the
5270
String class.  This method converts any HTML markup-significant characters
5271
in the string to their HTML equivalents; in particular, it converts
5272
an ampersand ("&amp;") to "&amp;amp;" and a less-than sign ("&lt;")
5273
to "&amp;lt;", and can also optionally quote spaces, tabs, and newlines
5274
to ensure display fidelity for these whitespace characters as well.
5275
5276
<li>Added a <a href="sysman/regex.htm">
5277
shortest-match modifier</a> to the regular expression closure
5278
operators ("*", "+", and "?").  This feature provides precise control
5279
over how matches are allocated in expressions involving multiple
5280
closures.
5281
5282
<li>Added the <a href="sysman/regex.htm">non-capturing
5283
modifier</a> to the regular expression group syntax; this allows a
5284
parenthesized group to be omitted from the counted groups.
5285
5286
<li>Added <a
5287
href="sysman/regex.htm">look-ahead assertions</a> to
5288
the regular expression syntax.
5289
5290
<li>Added the regular expression <a
5291
href="sysman/regex.htm">interval operator</a>, which provides a
5292
compact notation for specifying a specific number of repetitions of a
5293
sub-expression.
5294
5295
<li>Renamed a few <a href="sysman/list.htm">list methods</a> and array
5296
methods, and expanded both sets for greater consistency and more
5297
complete functionality:
5298
5299
   <ul>
5300
   <li>indexOf
5301
   <li>indexWhich
5302
   <li>valWhich
5303
   <li>lastIndexOf
5304
   <li>lastIndexWhich
5305
   <li>lastValWhich
5306
   <li>countOf
5307
   <li>countWhich
5308
   <li>mapAll
5309
   <li>applyAll (arrays only)
5310
   <li>forEach
5311
   <li>getUnique
5312
   </ul>
5313
5314
<li>When the default start-up module (_main.t) is automatically included
5315
in a build, _main.t is linked in first.  It was formerly linked in last,
5316
which didn't allow 'modify' or 'replace' to be used with objects defined
5317
in the module.
5318
5319
<li>When running under the debugger, RuntimeError exceptions now
5320
include stack trace information (with source line information) in the
5321
exceptionMessage string associated with the exception object.  This
5322
makes it easier to track down where a run-time error occurred.  Note
5323
that this information is available only when running under the debugger,
5324
because this is the only time the system has access to the necessary
5325
source line information.
5326
5327
<li>Added a "character map library" mechanism to the 
5328
<a href="sysman/alone.htm">stand-alone interpreter</a>.  This new feature
5329
allows a set of character map (.tcm) files to be bundled with a
5330
stand-alone game, eliminating the need to distribute separate .tcm files
5331
with a stand-alone game.  (Having to distribute .tcm files seemed to
5332
defeat the purpose of building a stand-alone executable.  The new
5333
bundling feature still allows users with localizations that aren't
5334
included in the standard character map set to add their own .tcm files,
5335
but it makes character mappings entirely invisible for most users.)
5336
5337
<li>Added CP1250.TCM (a character set mapping for the Windows
5338
Eastern/Central European code page), CP850.TCM (DOS OEM Latin 1),
5339
and CP852.TCM (DOS OEM Latin 2) to the default character map set
5340
for Windows.
5341
5342
</ul>
5343
5344
5345
<!------------------------------------------------------------------------>
5346
<h3>Changes since 03/30/2000</h3>
5347
5348
<ul>
5349
5350
<li>Slightly changed the <tt>InitObject</tt> mechanism.  The class
5351
formerly known as <tt>InitObject</tt> is now called
5352
<tt>PreinitObject</tt>, and a new class <tt>InitObject</tt> has been
5353
added.  The new <tt>InitObject</tt> does the same thing that
5354
<tt>PreinitObject</tt> does, but does it at regular program start-up
5355
rather than pre-initialization.  This change makes the
5356
pre-initialization and regular initialization mechanisms work the
5357
same way.  In addition, to make this mechanism more generic, both
5358
<tt>InitObject</tt> and <tt>PreinitObject</tt> now descend from a
5359
base class called <tt>ModuleExecObject</tt>; this class should be
5360
usable as the base class for other types of modular execution
5361
objects, such as perhaps a post-restore initializer sequence, a
5362
command parsing initializer sequence, and so on.  Refer to the
5363
<a href="sysman/init.htm">library pre-initialization</a> documentation for
5364
details.
5365
5366
<li>Added the <tt>-r</tt> option to the interpreter, allowing games to
5367
be restored directly from the command.  The saved state files now include
5368
information on the image file that created them, so if you're restoring
5369
a game, you don't have to specify the image file; this particular feature
5370
also allows double-clicking on a saved state from the desktop to start
5371
the interpreter, load the image file, and restore the saved state.
5372
5373
<li>The GrammarProd intrinsic class's parseTokens() method now
5374
includes truncated matches to dictionary words (according to the
5375
dictionary's truncation length setting) in its structural analysis.
5376
The method also includes truncated matches (again, using the dictionary
5377
setting) for literal tokens in the grammar.  If you don't want to allow
5378
truncated matches, simply change the dictionary's truncation length
5379
setting to zero.
5380
5381
</ul>
5382
5383
<!------------------------------------------------------------------------>
5384
<h3>Changes since 03/26/2000</h3>
5385
5386
<ul>
5387
5388
<li>Added a new <a href="sysman/init.htm">library pre-initialization</a>
5389
mechanism based on "initialization objects" rather than a simple
5390
preinit() method.  This new mechanism should be especially useful for
5391
library developers, since new initialization objects can be plugged in
5392
without touching any library or user code
5393
5394
<li>It is now possible to <a href='t3icext.htm'>extend
5395
intrinsic classes</a> with user-defined methods.
5396
5397
</ul>
5398
5399
<!------------------------------------------------------------------------>
5400
<h3>Changes since 03/21/2000</h3>
5401
5402
<ul>
5403
5404
<li>The method-based API to certain functions that were formerly
5405
implemented as intrinsics is now official.  The trailing underscores
5406
on the interim method names have been removed, and the corresponding
5407
functions have been removed from the intrinsic function sets.  
5408
5409
<ul>
5410
  <li>getSuperclassList() is now Object.getSuperclassList()
5411
  <li>isClass() is now Object.isClass()
5412
  <li>propDefined() is now Object.propDefined()
5413
  <li>propType() is now Object.propType()
5414
  <li>length() is now List.length() and String.length()
5415
  <li>sublist() is now List.sublist()
5416
  <li>intersect() is now List.intersect()
5417
  <li>car() and cdr() are now List.car() and List.cdr()
5418
  <li>substr() is now String.substr()
5419
  <li>toUpper() is now String.toUpper()
5420
  <li>toLower() is now String.toLower()
5421
  <li>find() is now List.find() and String.find()
5422
  <li>toUnicode() is now String.toUnicode()
5423
</ul>
5424
5425
This change will, of course, necessitate recompiling all code, and will
5426
require changing code that calls any of the functions that have been
5427
migrated to methods.  The sample code included in the distribution has
5428
been updated to reflect the changes, and the documentation has also been
5429
updated.
5430
5431
<li>Renamed the <tt>getSize()</tt> method in the Array class to
5432
<tt>length()</tt>, for consistency with List and String.
5433
5434
<li>Added the 'is in' and 'not in' operators.  See
5435
the <a href="sysman/expr.htm">"is in" and "not in" expressions</a>
5436
section.
5437
5438
<li>The debugger now has "program arguments" settings.  You can
5439
access these settings via a dialog, which you can open using the
5440
"Program Arguments" item on the "Debug" menu.  You can use the
5441
program arguments to control script file reading, output logging,
5442
and the argument string that is passed to your program's "_main()"
5443
entrypoint procedure.
5444
5445
<li>Added several new regular expression features: &lt;Case&gt; and
5446
&lt;NoCase&gt;, &lt;Alpha&gt, &lt;Upper&gt;, &lt;Lower&gt;, &lt;Digit&gt;,
5447
&lt;AlphaNum&gt;, &lt;Space&gt;, &lt;Punct&gt;.  Refer to the new
5448
<a href="sysman/regex.htm">regular expressions section</a> of the documentation
5449
for details.
5450
5451
<li>Enhanced the regular expression parser to detect and remove
5452
cycles in compiled patterns.  It is possible (pretty easy,
5453
actually) to introduce "infinite loops" into a pattern; the easiest
5454
way to do this is to put a zero-or-more closure inside another closure,
5455
as in "(.*)+" (this has an infinite loop because the expression in
5456
parentheses can match zero characters, and that match can be repeated any
5457
number of times), but much more complex and subtle types of cycles are
5458
possible and can be inadvertantly constructed.  Eliminating the
5459
infinitely repeating zero-length matches obviously doesn't change the
5460
meaning of the expression, since one repetition of a zero-length match is
5461
as good as a million, so the regular expression matcher simply detects
5462
and removes these loops and then carries on as normal.
5463
5464
<li>Updated StartI3.t and StartA3.t (the starter games in the Workbench
5465
kit) to work with _main.t, so you don't have to compile them with -nodef.
5466
(This also has the benefit of making the files a whole lot simpler.)
5467
Also updated them to use method calls rather than intrinsic function
5468
calls where appropriate.
5469
5470
<li>Updated the sample files to use the standard _main.t startup and
5471
new property functions.
5472
5473
</ul>
5474
5475
<!------------------------------------------------------------------------>
5476
<h3>Changes since 03/12/2000</h3>
5477
5478
<ul>
5479
5480
<li>Added <a href='t3dispfn.htm'>default display methods</a>, which
5481
allow string display to be routed through a method of the active
5482
"self" object in effect each time a string is displayed and each time
5483
an expression embedded in a string via the &lt;&lt; &gt;&gt; syntax
5484
is displayed.  This powerful new feature allows for per-object output
5485
filtering, and allows for "stateful" filtering (in that the filtering
5486
function is a method of the object that initiated the filtering, and
5487
can therefore look at properties of "self" to perform its work).
5488
5489
<li>Added the <a href='t3anonfn.htm#shortForm'>"short form" anonymous
5490
function</a> syntax, which is much
5491
more compact than the long form, but can only be used to define
5492
functions that consist solely of a single expression.
5493
5494
<li>Added the <tt>subset()</tt> and <tt>applyAll()</tt> methods to
5495
the <a href='t3array.htm'>array</a> and <a href="sysman/list.htm">list</a>
5496
intrinsic classes.
5497
5498
<li>Added <a href="sysman/list.htm">documentation for the List intrinsic
5499
class</a>.
5500
5501
<li>Added the <tt>-cs</tt> interpreter option, which allows the user
5502
to specify a character set to use for the display and keyboard.
5503
Refer to the new <a href='t3run.htm'>interpreter section</a> in
5504
the documentation.
5505
5506
<li>As mentioned above, there is a <a href='t3run.htm'>new section
5507
on the interpreter</a> in the documentation.
5508
5509
<li>The TADS 3 HTML interpreter and debugger for Windows now use a
5510
separate registry key for storing their preference settings.  In
5511
addition, the TADS 3 debugger's global preferences file is now
5512
called HTMLTDB3.TDC.  These changes should allow TADS 2 and TADS 3
5513
installations to co-exist independently on a single system, without
5514
affecting one another's stored configuration settings.
5515
5516
<li>Anonymous function objects are now represented by their own
5517
intrinsic class.  This is a mostly internal change, but does have
5518
the benefit of enabling the debugger to display the type of an
5519
anonymous function object (before, the debugger only knew that they
5520
were objects).
5521
5522
<li>Made some internal changes to the way anonymous function context
5523
objects are implemented to make them more efficient.  (In particular,
5524
context objects are now arrays, not TADS objects; array index lookup
5525
is faster than TADS object property lookup.)
5526
5527
<li>Moved the code to Visual C++ 6 (which involved no changes, not
5528
surprisingly, although the new C++ compiler caught a few dubious
5529
constructs and generated helpful warnings, all of which have been
5530
cleaned up).
5531
5532
</ul>
5533
5534
<!------------------------------------------------------------------------>
5535
</html>
5536