Please enable JavaScript to view this site.

A-Shell Development History

958.5.1  Specify ATE printer

The printer init command DEVICE=AUXLOC: may now specify an optional printer configuration name for ATE to use. This effectively issues the TAB(-10,54) command, as described in a previous edit below.

958.4.1   xcall MIAMEX,MX_FLINES

Fix bug in XCALL MIAMEX,MX_FLINES (147) where the slinelen argument was not always ignoring trailing spaces and control characters from the stripped line length returned. Note that the linelen argument continues to include the LF terminator (as well as any trailing spaces); but the slinelen argument now properly only counts the printable characters.

958.4.2   RENAME and MAKE

RENAME.LIT 3.1(110) and MAKE.LIT(103) recognize filespecs ending in "." as indicating a file with no extension, rather than as a wildcard.

958.3.1   xcall XTREE

XTREE now allows you to hide a column by using the mouse to shrink it's width to 0. (Actually, you could always have done this, but now, if XTR'USECOLORDER=1, XTREE sets the corresponding entry in the XTR'COLORDER array to <position>+128, which effectively causes the column to remain hidden on subsequent calls to reselect from the tree.

This can be demonstrated easily in the XTRA3 sample program: use opcode 0 and set the modeless option to create/display the tree; then manually shrink one or more of the columns to become invisible. Then exit the tree and re-enter it with opcode 0 or 1 to verify that the column remains hidden. (Use the popup menu option to unhide them.)

958.2.1   xcall INFLD

Fix conflicts between INFLD TYPEs ||m and F and ||S

958.2.2   xcall RENAME

RENAME.SBR now accepts files with no extension (previously it treated these as having extension DAT). Note: this is only part of the solution to the problem of not being able to rename a file with no extension. The other part requires an update to RENAME.LIT (not yet available).

958.1.1   xcall MIAMEX,MX_MKDIR and MX_HTMLHELP

Fix a timeout problem (5 second delay) in MIAMEX,97 (MKDIR) and MIAMEX,137 (HTMLHELP)

958.1.2   xcall INFLD

New INFLD TYPE codes related to combo boxes:

|m prevents the ENTER key, when used to select an item from the dropdown list, from also causing the field to exit.

||m causes EXITCODE 13 to be returned when an item is selected from the dropdown list (using ENTER or click). This allows you to distinguish that event from merely hitting ENTER to the field when the dropdown is not displayed.

958.1.3   xcall XTEXT

Fix a bug in which a popup XTEXT (TXF_POPUP) would clobber a control which had the same starting row/col position in the parent window.

958.1.4   xcall XTREE

XTREE now allows the program to keep track of temporarily hidden columns using the same means as it does to keep track of column order (i.e. via the XTR'COLORDER array). If XTR'COLORDER(x) >= 128, then real column x will be hidden.

The XTRA3 sample program has been updated (edit 130) to illustrate this. It also adds Hide and Unhide options to the popup menu to illustrate another way of accomplishing the same thing. (The beauty of the first method is that it requires no programming effort at all.)

958.0.1   Compiler

The compiler now supports REPEAT statement when compiling in X:1 or X:2 (BasicPlus) or /RC mode. REPEAT is similar to EXIT in that it can occur inside a DO loop or FOR/NEXT loop; it causes the control to transfer to the next iteration of the current loop without executing any remaining statements in the body of the current loop. For example:

TOT = 0

FOR I = 1 TO 10

    IF I = 5 REPEAT

    TOT = TOT + I

NEXT I

 

The above loop will set TOT to the sum of the numbers 1 thru 10, except 5.

958.0.2   Compiler

The compiler now supports the EXIT statement in /RC mode.

958.0.3   Compiler

The compiler now supports the SWITCH / ENDSWITCH / CASE / DEFAULT statements in /RC mode. (The generated RUN file is compatible with AMOS and existing A-Shell runtime versions.) The implementation is roughly compatible with the AMOS BASICPLUS version, although the details of the AMOS implementation are a bit vague, so here is an alternate explanation...

The general form of the SWITCH construct is as follows:

SWITCH <expr>

    CASE <constant>

        <statements>

        EXIT

    CASE <constant>

        <statements>

        EXIT

    DEFAULT

        <statements>

        EXIT

ENDSWITCH

 

The <expr> is first evaluated, and then list of CASE statements is scanned from top to bottom until a match is found between the <expr> and the <constant>. At that point, the <statements> below the matching CASE are executed. If there is no EXIT, the flow of control will continue on through the <statements> following the subsequent CASE statements. (In other words, once a match is found with a CASE, then all subsequent CASE and DEFAULT statements will match, which is why you almost always want to terminate the <statements> associated with a particular CASE with an EXIT.)

The optional DEFAULT statement is like a CASE that always matches, so its sub-statements will be executed if none of the above CASE statements match, or if a previous CASE statement matches but had no EXIT statement, so that control continued to flow.

Multiple CASE statements can share the same set of <statements>, and a single CASE statement can contain a range of values. A range consists of two constants separated by three dots (although one of the two ends of the range can be omitted to indicate an open-ended range). For example:

SWITCH DUES

    CASE 101...

        FREE'MASSAGES = -1

        EXIT

    CASE 100

    CASE 75

        FREE'MASSAGES = 3

        EXIT

    CASE 50...74

        FREE'MASSAGES = 1

        EXIT

    CASE ...49

        FREE'MASSAGES = 0

        EXIT

ENDSWITCH

 

In the above SWITCH, if DUES>=101, FREE'MASSAGES is set to -1. If DUES=100 or DUES=75 then FREE'MASSAGES = 3. If DUES>=50 and DUES<=74, the FREE'MASSAGES = 1, and if DUES<=49 then FREE'MASSAGES = 0. If DUES>75 and DUES<100, then none of the CASE statements match, and since no DEFAULT was specified, the SWITCH ends up having no effect.

Note that as is typical with numeric expressions in Basic, they can evaluate to integers or floating point values. Although it is somewhat unorthodox to use a SWITCH with non-integers, there is no law against it.

The <expr> given in the SWITCH statement can be any type, but the <constants> in the CASE statements must match that type. In other words, if the <expr> is a string, then the CASE <constants> must be literal (quoted) strings, as shown here:

SWITCH MEMBER'TYPE$

    CASE "Platinum"

        FREE'UPGRADES = 5

        FREE'MASSAGES = 3

        DUES = 100

        EXIT

    CASE "G"..."Gold"

        FREE'UPGRADES = 3

        FREE'MASSAGES = 3

        DUES = 75

        EXIT

    DEFAULT

        FREE'UPGRADES = 0

        FREE'MASSAGES = 1

        DUES = 50

        EXIT

ENDSWITCH

 

In the above example, the second CASE statement would match when MEMBER'TYPE$>="G" and MEMBER'TYPE$<="Gold" (using normal Basic string comparison logic). As a reminder, AlphaBasic treats trailing blanks the same as nulls in string comparisons, so the second CASE would match even if MEMBER'TYPE$="Gold   ".

Note that the maximum length of the literal strings in the CASE statements in this case must not exceed the current default string size as set by the STRSIZ statement.

Also note that this form of the SWITCH (i.e. with string expressions) does not appear to be support by AMOS.

For the more common type of SWITCH (numeric), the CASE constants can also be ASCII constants, or hex/octal constants), for example:

SWITCH ASC(A$[B;1])

    CASE 'A'...'Z'

    CASE 'a'...'z'

        TYP$ = "Alpha"

        EXIT

    CASE '0'...'9'

        TYP$ = "Number"

        EXIT

    CASE &h80...

        TYP$ = "8 bit"

        EXIT

    CASE ...&o37

        TYP$ = "Control"

        EXIT

    DEFAULT

        TYP$ = "Punc"

        EXIT

ENDSWITCH

 

Note that any statements between the SWITCH statement and the first CASE are actually executed in all cases under A-Shell, whereas they may not be in other implementations of SWITCH statements (such as AMOS). Consequently you should avoid putting any statements there, except perhaps for debugging purposes.

958.0.4   xcall XTREE

Close window for memory corruption to occur when the size of the ANSWER parameter passed to XTREE.SBR (with the XTF_MSEL, XTF_EDITABLE, or XTF_DRAGDROP options) is larger than the size of the ARRAY parameter. This would normally not make any sense, given that the ANSWER data would always have to be a subset of the item data passed in the ARRAY parameter, but some programs use a common, large ANSWER array with different sets of ARRAY data.

958.0.5   GUI

Close window for click confusion when a dialog is closed immediately in response to a double-click, and there is a clickable control immediately below the dialog. The symptom was that sometimes the double-click would have a residual effect of triggering the underlying control click action too.

958.0.6   INFLD

Close an INFLD loophole in which you could bypass pass the character filtering rules by using the Paste option from the context menu of the edit control itself. Now that operation is trapped and re-routed through the keyboard handler so that INFLD can discard (or fold) or otherwise preprocess the characters.