Problem with @INT[ value] in V26

May 22, 2013
To test an upgrade fom v19 to v26, strange thing happened.
Wen starting TCC, it normaly displays a logo on top of the window, but under v26 it displays something started with "USAGE: DRAWBOX...
Aha.. something changed in V26? No, my code is absolutely right. Ok, lets start the debugger.
kidding? In the debugger, it works fine:

@echo off
set cols=160
set line=** %ostype *** TCC %_version%.%_build **
set left=%@int[%@eval[%cols/2 - %@len[%line]/2]]
set right=%@int[%@eval[%left+%@len[%line]+4]]
drawbox 0 %left 4 %right 2 BRIGHT WHITE ON BLUE FILL BLUE
Scrput 2 %@eval[%left+3] bright White on Blue %line
REM to show what happens
echo %left %right

This is what happens. Under the debugger %left and %right show the correct integer value. But when start normally, the function @INT simply does nothing.

Even from the command prompt:
echo INT@[4,3] returns 4,3
Last edited:
Apr 18, 2014
That looks like a problem with the decimal separator. Type OPTION at the prompt, then select the advanced tab and check what is set for the decimal separator:

Apr 18, 2014
Thus it is a bug in the debugger? Or you just dit nor read my post..
Yes I did read your post, did you try my suggestion?

I've no idea if there's a bug in the debugger; I'm not associated with JP Software, I'm just another user trying to be helpful. You reported that @INT[4,3] isn't working at the prompt, and that looks like a decimal separator problem. If it is, and you fix it, does the problem go away? If it does, your immediate issue would seem to be solved to me. In slower time a possible issue with the debugger could be checked out.
May 22, 2013
No, I will not try that. If someone uses the symbol for digit grouping, the function would just ignore and remove it. The fact that under the debugger everthing is ok, and @INT worked perfect in at least the last 20 years, makes clear it is a bug.

Charles Dye

Super Moderator
Staff member
May 20, 2008
Albuquerque, NM
Your batch file, and the @INT function, work fine here, debugger or no.

The contents of your 4START.BTM and TCMD.INI files may be relevant to figuring out why debugger vs. no debugger differs for you.
May 20, 2008
Syracuse, NY, USA
v:\> type dbdb.btm
option DecimalChar
echo %@int[4,3]

In the debugger or not, I get something that doesn't look right.

May 22, 2013
Here good old 4START.BTM is called tcstart.btm and I started trouble shooting by temporary remove both tcstart.btm and tcmd.ini.
Ok, the problem is gone.
Restore tcmd.ini
Ok, still no problem yet
thus tcstart should be the prime suspect? Impossible, as it is the same I used for TCC v11 and TCC v19 for years..
However, YES Found de buggy bug. ;-)

The bug is in SETDOS /G,.
When using that, both Decimal and Thousands are set to comma, while SETDOS /G., wil set both Decimal and Thousands to Period. Thus always the first character.

The instruction is no longer needed today, thus removing is not a problem. But o course, it still is a bug in TCC v26
May 20, 2008
Syracuse, NY, USA
[Post deleted] OK, I see what Ruud is saying. With OPTION setting the decimal and thousands chars, @INT is OK.

v:\> option //decimalchar=,

v:\> option //ThousandsChar=.

v:\> echo %@int[4,3]

v:\> option //decimalchar=.

v:\> option //ThousandsChar=,

v:\> echo %@int[4.3]

As Ruud said, SETDOS sets both to the same character.

v:\> setdos /G,.

v:\> option DecimalChar

v:\> option ThousandsChar

v:\> setdos /G.,

v:\> option DecimalChar

v:\> option ThousandsChar
Similar threads
Thread starter Title Forum Replies Date
A Problem with functions @int @decimal and identifying Powershell as a shell. Support 12
Dick Johnson Weird Color Problem Support 8 Problem with 27.15 Support 2
M Problem with VSDevCmd.bat in VS 16.7.3 Support 0
M Selecting test "off by one" problem in Take command Support 4
Alpengreis UTF-8 problem in TCC related to Python Support 7
K_Meinhard Small problem in german IDE 26 Support 3
B Problem with color in nested shells Support 1
Joe Caverly Problem creating and switching to a DESKTOP Support 9
vefatica Another popup problem Support 10
Alpengreis ffind dialog (/W) problem Support 4
Alpengreis [TCMD v25.00.24] Small space problem with the DE translation in Prefs-GUI Support 1
Alpengreis [TCMD v25.00.24] Problem with copy and paste and the # char via mouse in TCC Support 6
B IF command problem in tcexit.btm Support 9 Problem at Startup of TCC Support 3
P Problem with SFTP copies Support 7
P Problem with FTP copies Support 10
Jay Sage Problem with Context Menu Copy+Paste+Run Key Assignment Support 7
R Problem with %_do_loop in nested do loops Support 2 New Problem with later Windows 10 Support 10
Peter Murschall A little problem with LEAVE and COMMENT Support 5
M Handling of %~I problem Support 4
WinLanEm FOR problem Support 18
K Problem With SCRPUT /u Support 3
vefatica What's TCMD's problem with ^e[0m? Support 13
Peter Murschall IDE: RTL with non-English resources-problem is back in Build 28 Support 4
rps Regex problem: \xnn not recognized as a hex character Support 0
rps PRIORITY LOW problem Support 1
old coot Regex problem: \xnn not recognized as a hex character Support 12
vefatica Another problem with build 22. Support 3
Alpengreis [23.x] Download-Problem Support 2
S Problem with " Support 3
C Problem navigating forums Support 11
x13 Problem listing repository files using DIR http(s)://... Support 8
Joe Caverly Problem with TEE in v22 Support 2
Alpengreis Problem with thousands delimiter and colors Support 17
M Take Command 18, migrating to another machine, license problem. Support 1
B TCC 21.01.50 Problem with ALIAS /r and SET /r Support 2
rps How to? @search problem Support 2
WinLanEm @SELECT problem Support 6
T Fixed Problem with use of Batch parameters in the IDE Support 1
Oz Solomon Problem with "list" Support 14
S V21.24 theme problem Support 2
Alpengreis Problem if command prompt is not legacy Support 4
Alpengreis TCMD.INI: The "super hidden" problem ... Support 6
G Odd problem - screen brightness Support 4
rps V20 In-process pipes problem Support 8
Alpengreis Again theme problem [v20.0.21]? Support 11
WinLanEm INPUT problem Support 1
Craig Fitzgerald problem with executable extensons with TCC version 19.10.51 x64 Support 3

Similar threads