possible bug in SETDOS

Feb 25, 2009
16
0
Latest TCC version.

No problems with SETDOS from the command line.

From within a BTM:

set XSTR=-245689A
setdos /x%XSTR
setdos

and then later:

set XSTR=-24689A
setdos /x%XSTR
setdos

After the first setting, setdos will show EXPANSION=245689A

After the second, setdos will still show EXPANSION=245689A

If a setdos /x0 is performed prior to the second setting, then the results are as expected.

The following produces the problem every time.

Code:
@echo off
setlocal
 
alias safemode=gosub setdosx safe
alias semisafe=gosub setdosx semi
alias unsafe=gosub setdosx off
goto start
 
:: ---------------------------------------------------------
:setdosx [mode]
  switch "%mode"
  case "safe"
    set SETDOSX_MODE=-245689A
  case "semi"
    set SETDOSX_MODE=-24589A
  default
    set SETDOSX_MODE=0
  endswitch
  setdos /x%SETDOSX_MODE
RETURN
 
:: ---------------------------------------------------------
:test [mode]
  echo Checking %mode
  %mode
  echo SETDOSX_MODE=%SETDOSX_MODE
  setdos
  echo ----------
  pause
return
 
:: ---------------------------------------------------------
:start
 
gosub test safemode
gosub test semisafe
gosub test unsafe
gosub test safemode
gosub test unsafe
 
May 20, 2008
3,515
4
Elkridge, MD, USA
grimblefritz wrote:
| Latest TCC version.
|
| No problems with SETDOS from the command line.
|
| From within a BTM:
|
| set XSTR=-245689A
| setdos /x%XSTR
| setdos
|
| and then later:
|
| set XSTR=-24689A
| setdos /x%XSTR
| setdos
|
| After the first setting, setdos will show EXPANSION=245689A
|
| After the second, setdos will still show EXPANSION=245689A
|
| If a setdos /x0 is performed prior to the second setting, then the
| results are as expected.

WAD, exactly as it did from the first time it became available in 4DOS
decades ago. The reason is that each of the SETDOS /x options is persistent,
and is retained until cancelled. BTW, there is no difference between SETDOS
behavior in a batch program and at the command line. Try out the same
commands from the command line, and you'll observe the same results.
--
HTH, Steve
 
Feb 25, 2009
16
0
That probably should be more clearly documented in the help.

I've used this since the first Norton version and never understood that behavior -- probably because I never had need until now to shift between multiple modes, only to disable some and then /X0.
 
May 20, 2008
11,285
95
Syracuse, NY, USA
On Thu, 09 Jul 2009 22:13:44 -0500, grimblefritz <> wrote:

|That probably should be more clearly documented in the help.

It seems pretty clear. I would not have expected SETDOS /X-24689A to enable 5
after SETDOS /X-245689A disabled it. I would have expected the unmentioned
options (1357) to keep their state. Options are enables with /X+N (or /X0 for
all of them).
--
- Vince
 
Similar threads
Thread starter Title Forum Replies Date
Jay Sage WAD Possible Bug With OPTION Command With @FILE Support 5
I Possible Bug: History /n Returns Nothing Support 3
Jay Sage WAD Possible Bug in Batch Parameters Support 7
noahcoad Possible Bug? Launching 4nt.exe Goes Hairwire Support 10
M Is bash-like filename completion possible? Support 3
vefatica DO /P ... is this possible ... ? Support 5
M @FileSize - How is this possible? Support 10
S Is restartable TCMD download possible? Support 6
H Possible V16 documentation error? Support 2
The Wizard WAD Possible Incorrect COMSPEC handling Support 2
S How to? Is it possible for the IDE to start without plugins? Support 3
A How to? Is it possible to freeze one side of the console? Support 19
Vasilich How to? debugging files that use CALL command - possible?? Support 3
wbiebel Can this be possible: TCEXIT is not executed? Support 21
Frank VIEWing multiple files possible? Support 4
daniel347x Is it possible to send a line from the "command input" window to the tab without pressing "Enter", w Support 4
C Possible caching problem with http files Support 7
S Dir - case selection possible?? Support 3
T Possible to delete the new standard tab? Support 1
M Something that does not seem possible... Support 2
D Is this possible, and how Support 0
R strange bug? Support 7
Jay Sage Bug With Flow Control and/or Command Grouping Support 2
M Server 2019 Bug with @execstr? Support 14
R bug _ypixels in BDEBUGGER Support 6
E Fixed Bug with DIR /Z displaying descriptions Support 8
E Text copy bug Support 1
x13 SETARRAY /Z bug Support 6
Gamegod ffind bug with chinese Support 2
Dick Johnson cdd - is this a bug or a feature? Support 7
P "Set" command behavior - a bug? Support 3
nikbackm TCC 20 variable expansion bug Support 6
gentzel Bug launching external commands in 20.11.43 Support 11
R Is this a bug in SETARRAY? Support 2
M Windows Installer bug? Support 4
vefatica @SCRIPT bug persists Support 4
M Little bug, big consequences .. Support 6
fishman@panix.com Once again the Can't Install bug bites... Support 2
gentzel Fixed dirs +n bug in 20.0.12 x64 Support 2
M Bug in Windows 10, when adding symbol to task bar Support 6
Alpengreis [Bug?] View (V) Prefs Error (TC 18.00.27 x64) Support 4
D WAD Minor Post Installation Bug in V18 Support 1
samintz WAD Weird REN bug Support 6
G Bug? TCC 16.03.55 Console Palette Support 4
S Return of FTP copy bug in 16.02.48 Support 12
S XenForo bug Support 3
D TCMD16 Delete Toolbar Button bug Support 7
keithg1964 WAD 16.0027 Alias /rz bug Support 8
rfaquino WAD Apparently a bug when expanding environment variable %ProgramFiles(x86) Support 2
T Documentation @LINE[CON,n] @LINES[CON] not documented (bug?) Support 4

Similar threads