Please enable JavaScript to view this site.

A-Shell 6.5 Development Notes

The new cmdinput parameter to MX_SETCMDINP and MX_GETCMDINP allows enabling / disabling command file input for BASIC statements INPUT and INPUT LINE in addition to INFLD:

 

xcall MIAMEX, MX_GETCMDINP, cmdinfld {,cmdinput}

Parameters

cmdinfld  (Num)  [out]

returns 1 if command file input for XCALL INFLD enabled; else 0

cmdinput  (Num)  [out]

returns 1 if command file input for INPUT and INPUT LINE enabled; else 0

 

xcall MIAMEX, MX_SETCMDINP, cmdinfld {,cmdinput} cmdinfld

Parameters

cmdinfld  (Num)  [out]

set to 1 to enable commmand file input for xcall INFLD

cmdinput (num) [in] -

set to 1 (default) to enable command input for INPUT and INPUT LINE enabled; else 0 to disable.

 

The are two main intended uses for this new feature:

To prevent the accidental use of command file input for certain critical kinds of inputs (passwords, etc.), where you don't want to resort to a more sophisticated input mechanism like INFLD.
To allow command file wrappers to be created for programs which may perform conditional or unexpected standard inputs that you don't want to come from your wrapper command file.

Note that setting the cmdinput flag to 0 only disables command file input for INPUT and INPUT LINE within programs; it does not affect the ability of command files to execute commands. Furthermore it is automatically re-enabled when you end up at the command prompt and there is no more command file input available.