Please enable JavaScript to view this site.

A-Shell 6.5 Development Notes

Navigation: Notes by Subject

A-Shell BASIC

Scroll Prev Top Next More

 

1742.0.3

Language enhancement, compiler edit 1036: WRITECD ARY() statement now supports numeric array types as well as gridmaps.

1741.0.1

New dot function .ISEMPTY(expr) returns .TRUE if the expression is .NULL, or consists of zero or more blanks and nothing else. This is logically equivalent to but simpler than (ife(expr,"")="").

1740.2.5

Parameter passing refinement: DIMX arrays of type S or X are now treated as compatible with each other when passed by reference to a function. Previously this triggered an incompatible parameter error.

1739.0.1

FOREACH: if the specified starting key is not found, the iteration now starts with the next key. Previously, the result would have been an empty iteration.

1739.0.2

FOREACH'REVERSE: the starting key is now recognized; previously it was ignored. And as with FOREACH, if not found, the iteration starts with the next key—i.e. the next one lower in the collating sequence.

1739.0.3

Add convenience operator for assigning elements from a CSV-formatted string to an array in a single operation.

1736.0.1

Add New Gridmap Functions.

1735.0.4

Parameter passing refinement: passing an X value to a numeric parameter type now performs a string-to-numeric conversion like you would get when passing an S value to a numeric type, or when assigning an X value to a numeric type. Previously it was doing a raw byte copy from the source to the receiving parameter.

1733.0.3

Compiler edit 1026, language enhancement: provide support for storing a label reference in a numeric variable and then using it as the target of a GOTO, CALL or GOSUB statement:

VAR = *LABEL    ! store address of LABEL: in VAR

...

GOTO  @VAR      ! goto address stored in VAR (LABEL:)

CALL @VAR       ! call address stored in VAR

GOSUB @VAR      ! same as CALL

 

1733.0.1

DYNSTRUCT enhancement: assignment from an initialized DYNSTRUCT to an UNinitialized DYNSTRUCT is now allowed, and results in the target being defined and bound and then copied. Previously it caused error #70, invalid dynstruct reference.

On the flip size, assignment FROM an UNinitialized DYNSTRUCT to any type is now trapped, generating error #70. Previously it was treated as an assignment from an unitialized X,0 variable.

1732.0.4

Compiler edit 1025 adds support for "transclude" variation of ++include directives.

1731.0.1

Compiler edit 1022: Compiler now complains about mismatched collection arrays passed by reference to functions.

1725.0.1

Compiler edit 1014, add support for trigonometric DATN Function.

1724.2.1

Add INT() and FIX() Fudge Factor.

1724.0.3

Compiler edit 1012, language enhancement: DIMX arrays of type S may now be passed by reference to functions. Previously, only type X was allowed.

1724.0.4

Compiler edit 1013, language enhancement: DIMX arrays of type B, F and I may now be passed by reference to functions.

1720.0.5

Language enhancement, compiler edit 1000: named parameters can now be used with DYNFUNC, e.g.

DYNFUNC(fname$, argx=valuex, argy=value1)

Note that this affects both the compiler and runtime, so the use of named parameters in a DYNFUNC expression will now set the minimum runtime level to 6.5.1720.

1720.0.6

Language enhancement, compiler edit 1001: default parameter values are now supported in dynamic functions. Previously the compiler didn't complain, since functions declared dynamic can still be called statically.

Note that in the case of dynamic functions, default values are limited to constant expressions, whereas for static functions, they could involve variables.

Use of default values in a dynamic function definition now sets the minimum runtime level to 1720, so programs that ran under earlier runtimes (whether or not the default values were respected) will now require the 6.5.1720+ runtime.

1720.0.7

Language enhancement, compiler edit 1001: /CI support now extended to dynamic functions, both the function names and argument names.

1720.0.8

Language enhancement, compiler edit 1001: The CALL statement can now be used to invoke a dynamic function. For example:

CALL DYNFUNC(func$,args...)

CALL DYNFUNC$(func$,args...)

This is analogous to using the CALL statement with static function, and is more natural than a dummy assignment when you don't care about the return value of the function. Requires A-Shell 6.5.1720+.

1718.0

BINDSTRUCT enhancement: the second argument (the defstruct instance) may now be a base array reference.

1713.0.1

Language enhancement, compiler edit 977: New system function TRIM(strexp), or TRIM$(strexp). This removes the leading and trailing blanks from the string expression argument, equivalent to the combination of STRIP$(strexp) and LSTRIP$(strexp). Besides offering the advantage of functional syntax, as a built-in function, TRIM$() is more efficient than the equivalent XCALL TRIM (although the latter offers an additional option to remove other characters besides blanks).

1712.0.1

Compiler Edit 970: remove all special adjustments to the operator precedence rules in shortcut operator statements.

1712.0.2

Language enhancement, compiler edit 971: New system function LSTRIP strips leading blanks from the specified string expression. Syntax: LSTRIP(strexp) or LSTRIP$(strexp).

1711.2

Compiler edit 967, refinement: LSX file ++include indicators now show a <##_#> suffix indicating the sequential file # and the nesting level.

1711.0.1

Language enhancement: Structure Definition Embedding added to A-Shell.

1711.0.2

MX_DYNSTRUCT enhancement: the DYNOP_DEF call now supports the ability to retrieve the structure definition directly from the RUN file, provided it has been embedded. To indicate that you want to retrieve the definition from the current RUN file, set the src$ parameter to "", for example: xcall MIAMEX, MX_DYNSTRUCT, DYNOP_DEF, status, "", fields, stsize, dsname$

1711.0.3

Language enhancement: New statement .BINDSTRUCT binds a dynamic structure to the defstruct associated with a defstruct instance and then copies the defstruct instance data to the dynstruct.

1711.0.4

Language enhancement: automatic DYNSTRUCT binding during function call parameter passing.

1711.0.5

Language enhancement: new dot function .ISDEF can be used to determine whether the specified DYNSTRUCT member exists.

1711.0.6

Language enhancement: new dot function .DYNOFFSET returns the offset to the specified DYNSTRUCT member.

1711.0.7

Language enhancement: new dot function .DYNOFFSIZ$ acts like .OFFSIZ$() except that it operates at run time instead of compile time and works exclusively for DYNSTRUCT members.

1708.1.1

USING Expressions on the right side of shortcut operators are now evaluated after the completed expansion of the shortcut operator statement.

1708.1.2

New auto-defined Macro ABC_SCALE is set to the current SCALE value.

1708.0.6

Compiler edit edit 957 : DEFALIAS now updates the effective type (string or numeric) of the function, making it possible to alias a numeric function call to a string function or vice versa, e.g.: DEFALIAS Fn'Foo()  = Fn'Foo$() and DEFALIAS Fn'Bar$() = Fn'Bar()

1707.0.2

Compiler edit 952 for MX_DYNSTRUCT support: the default amount of work area memory allocated when defining (compiling) a dynamic structure has been increased from 128K to 2M. While 128K was more than enough for the largest ordinary structure definitions, it wasn't always enough for structures embedded within much large source files, especially files that ++included other files. Defining a dynamic structure requires essentially compiling all of the source code preceding the target DEFSTRUCT to make sure that any dependent definitions or conditionals are properly taken into account.

1706.0.1

Language enhancement: Enable Auto-Mapped %Var Variables.

1704.1.1

Language refinement, compiler edit 947: all standard string functions now support the optional $ suffix on the name (e.g. STR(x) or STR$(x).) The following functions did not previously support the optional $ suffix: AUTOCAP$(a$), LCS$(a$), ODTIM$(date,time,flags), RTRIM$(a$), UCS$(a$).

1704.0

Language enhancement, compiler edit 946, auto-mapped for/next loop variables: You may now create a new variable on the fly to act as the loop counter in a for/next loop by preceding the variable name with a % as in this example:

for %i = 1 to 10

    print %i

next %i

xx

 

The variable %i will be automatically mapped (as an F,6), with its scope limited to the boundaries of the for/next loop.

Besides acting as "syntactic sugar" to save typing (i.e. by eliminating the need to separately map the loop counter variable), the feature also has the benefit of reducing the chance of an accidental conflict between the loop counter and an existing concurrent use of the same variable.

The concept is similar to the $$i iterators.

1702.0.1

New VALX Function is an extended version of the VAL function.

1697.0.1

New language feature: WRITECD or WRITETD of an Entire Array.

1697.0.2

INPUT CSV Refinement: INPUT CSV #ch, ary() now updates the ary() extent based on the number of elements input.

1695.0

Language enhancement: Implicit Function Return Value Capture.

1690.3

Compiler (edit 938) refinement: support a ++ifdef ... ++endif statement on a single source line, e.g.

++ifdef TEST_MODE : ? "Running in test mode" :  ++endif

Note that this is intended to be an accommodation to simplify injection of test or debugging code into source code, and not as an embrace of the generalized concept of jamming multiple statements—especially not pragmas—on one source line. Developers are encouraged to use the TRACE and DEBUG statements for messaging that can be enabled at run time rather than compile time.

1683.0.1

Compiler (edit 937) refinement: arrays/collections may now be passed to DYNFUNC(), as they can in normal function references. Previously only array elements were supported.

1687.0.1

Language enhancments in compiler edit 935: Add new dot variables

.MILLITIME returns number of milliseconds since midnight

.MICROTIME returns number of microseconds since midnight

 

Note that due to quirks of the system scheduling clocks on different platforms, the resolution of the .MICROTIME results may not be as granular as one might expect.

1686.0

Add new Shortcut Operators #+= and $+=.

1685.0.1

Several New Dot Variables added.

1684.7.2

READ, XREAD and ISAMA GET operations now work with dynamic X (X0) record variables, regardless of whether they are pre-initialized. Previously this only worked if the variable was pre-initialized to the size of the record.

1684.0.3

XOPEN Enhancement.

1684.0.4

XOPEN for Random and ISAM.

1683.0.5

Compiler (edit 929) enhancements/refinements:

New ++PRAGMA FORCE_F1_HDR "<boolean>" may be used to toggle the /F1 switch.
Use of the .ISNULL() function now sets the minimum runtime version to 1414.

1683.0.4

Compiler (edit 928) updated to support the above language enhancements.

1683.0.3

Language enhancement: new statement to set the record number of a file:

set'recno #channel, expr

This would be equivalent to setting the recno variable, associated with channel in the OPEN statement, to the value of expr.

1683.0.2

Language enhancement: new dot functions to access the fstat and recno attributes associated with an ISAMA file:

.fstat(channel) - returns the file status for the last operation

.recno(channel) - returns the current record number

The only link between these functions and the file open (OPEN or XOPEN) statement is via the channel number.

1683.0.1

Language enhancement: XOPEN Statement for ISAMA.

1671.4.5

ISNULL function now generates an error when it should.

1670.0.5

Compiler edit 920: the Minimum Run Version stored in the program header now distinguishes between two variations of the .CLEAR statement:

1668.3.1

Add random file BASIC statement XUNLOKR.

1668.0.2

Compiler edit 918: the shortcut operators += and -= now work with collections. Adding/subtracting collections was implemented in 6.5.1650, but the compiler was recognizing only the long form of the assignment, e.g. $map1() = $map1() + $map(2).

1663.0

++PRAGMA LXS_FSPEC provides a way to assign a name to the LSX file that includes the vedit field of the program version.

1661.0.7

Compiler language enhancement, edit 905: new compiler functional directive EXTERN(expr).

1661.0.3

Compiler edit 903: .SIZEOF() now supports DEFTYPE names, e.g. .SIZEOF(BOOLEAN).

1660.0.2

Compiler edit 898: MX_DYNSTRUCT now allows DEFTYPE aliases for implicitly sized X variables. There were previously allowed, but the DEFTYPE name was lost during the runtime compilation.

1659.0

Compiler edit 897 and runtime fix for IFE() and IFE$() functions; see 6.5.1657. Original implementation didn't hold up when nested within other types of expressions, in particular IFELSE(). Note that the fix involves both the compiler and runtime.

1657.0.2

Compiler edit 896: The compiler now embeds into the object header an indication of the minimum acceptable A-Shell runtime version, when certain newer language features are present. Runtime versions prior to 6.5.1657 will not recognize the new header signature and will treat the RUN as invalid (i.e. will refuse to run it). From this version on, the runtime system will recognize the minimum version header and will give a more precise error. Program requires minimum A-Shell level ####.

1657.0.1

Compiler edit 895 adds new functions IFE and IFE$.

1656.0.3

EDIT$ enhancement adds two new flags.

1656.0.2

Compiler edit 893: The LSX Header now includes more detail.

1656.0.1

Compiler edit 892: Add Explicit Comparison Operators.

1655.0.2

Compiler edit 891: Add new pragma ++PRAGMA AUTO_LARGE_CONSTANTS.

1655.0.1

Compiler edit 890: dd new operators and casting functions NUMEXPR, STREXPR, #+, $+ to eliminate the ambiguity in the + operator.

1651.8

Compiler edit 889: unmapped struct.member errors now display the full struct.member name. Previously it was only noting the structure name.

1650.0.1

Compiler (edit 888) language extension: high level operations to Copy, Add, Subtract Collections (i.e. ORDMAP, ORDMAPM and MLIST structures) to/from each other.

1647.0.1

Compiler (edit 879) language extension: Dynamic Function Calls.

1647.0.2

Compiler (edit 880) language extension: Use of Ellipsis (...) in argument lists to facilitate passing arguments through a wrapper function.

1647.0.3

Compiler (edit 881) - Support .fn (case INsensitive) within a function as an alias for the function name variable. For example...

Function Fn'Foo(a as b2) as f6

    .fn = a**2           ! equivalent to Fn'Foo = a**2

EndFunction

 

Note that the $ suffix is not used here; the .FN alias applies to both string and numeric functions.

1647.0.4

Compiler (edit 882) - Various fixes/refinements: The dynfunc mechanism now allows for retrieval of function return type information—see MX_DYNFUNC below—and TRACE.PRINT statements with the (level) and/or (level,tags) option were throwing bogus syntax errors for variations that weren't errors.

1646.1

Compiler refinements/fixes (edit 879):

Revise compilation of ds.field(x) and ds.@fname$(x) to allow for better runtime error detection and handling. Incorrect use of ds.@fname$(x) in place of ds.@fname$(x)(y) can now be trapped at runtime with error 71, undefined dynstruct member. Any programs using DYNSTRUCT must be recompiled!
Improve robustness of file-based MX_DYNSTRUCT DYNOP_DEF
Disable the auto-tracing—activated by ++PRAGMA TRACE_BEGIN—of MAP statements with initializers, as this was leading to spurious errors.
Fix spurious compiler error on IF <expr> RESUME <label>.
Fix problem with ++PRAGMA TRACE_BEGIN appearing to have no effect after a previous ++PRAGMA TRACE_BEGIN at the same nesting level.

1646.1

Compiler/language refinement (edit 877) - change syntax for indirect deferred dynstruct references from ".." to ".@" :

ds.@fname  ! fname contains name of member (was ds..fname)

ds.fname   ! fname is name of member (same as before)

 

Samples and related support files in SOSLIB and EXLIB updated accordingly.

1645.0.1

Compiler edit 873 language extension: dynamic structures. Temporary documentation here.

1641.0.1

Compiler edit 868 language enhancement: PRIVATE variables and ++PRAGMA PRIVATE_BEGIN / _END blocks may now be used in the main source module to limit the scope of those variables to just that source file. Note that this enhancement entirely handled by the compiler; there is no issue with backwards or forwards runtime compatibility, even under AMOS.

1639.3.3

Compiler edit 865: Add private functions to the tags file for the benefit of APN and the Go To Definition script.

1633.0.1

Collections enhancement: Writable Iterators

1629.0

Add language feature: INPUT CSV into a Dynamic Array.

1628.1.1

Clean up various inconsistencies in the SCALE system. SBXs now inherit the scale of the caller, overriding any SCALE specified in the SBX. There is no longer any point in specifying SCALE within an SBX.

1628.0.2

Compiler edit 852 enhancement: increase maximum length of a single line of source code, including continuations, from 3K to 16K. Also increase the limit on the number of xcall / function / procedure parameters from 128 to 1024.

1624.0.1

Compiler edit 845: STRSIZ-related refinements

1624.0.2

Compiler edit 846: .CLEAR enhancement: .CLEAR ARY() now supported for all types of arrays; previously it only applied to collections. The details of the clearing operation depend on the nature of the array being clear, described in further detail below. Warning: using .CLEAR with any array type other than a collection (e.g. ORDMAP) requires that runtime version 6.5.1624 or above. Otherwise it will generate an Unsupported Function error.

1624.0.3

New CLEAR (ARY) Options

1620.0.1

Add ASB Statement DEFALIAS.

1616.0.2

Compiler edit 834: Support .ARGTYP(@arg) and .ARGSIZ(@arg). Concept is similar to that used for XPUTARG @arg (i.e. @arg is treated essential as a macro for the argument number corresponding to the argument arg as defined in the function/procedure definition or as retrieved in an SBX using XGETARG(S).) No change to the runtime system required.

1613.0

Compiler edit 831: relax limitations on XPUTARG @VAR to allow the same parameter number to be associated with multiple variables, provided that the VAR the XPUTARG @VAR statement is never associated with more than a single parameter #. For example:

XGETARGS ONE,TWO,THREE

XGETARG 2,DOS           ! TWO and DOS now both associated with #2

...

XPUTARG @TWO            ! Now allowed (e.g. 2,TWO); previously not

1608.0

Language enhancement: XPUTARG Name Reference #1.

1607.0.1

Language enhancement: XPUTARG Name Reference #1.

1605.0

Language enhancement: added Shortcut Operators.

1603.0

Language enhancement: DEFSTRUCT Can Include MAP1.