Leading question mark in command

May 29, 2008
567
4
Groton, CT
Win XP Pro SP3, TCC 11.00.40

I discovered quite accidentally that a command with a leading question mark (but not a single isolated question mark) asks the user whether to execute the command.

E.g.,
> ?foo
foo (Y/N)? Y
TCC: Unknown command "foo"

> ?echo food
echo food (Y/N)? Y
food

> ?echo drink
echo drink (Y/N)? N

(nothing)

This works if the command is in a .bat or .btm file, too.

I have no alias named "?".

I couldn't find anything in the help file about it (but that just may be because I didn't know how to look it up).

Rex, is this a feature?
 

Charles Dye

Super Moderator
Staff member
May 20, 2008
4,447
88
Albuquerque, NM
prospero.unm.edu
Win XP Pro SP3, TCC 11.00.40

I discovered quite accidentally that a command with a leading question mark (but not a single isolated question mark) asks the user whether to execute the command.

I couldn't find anything in the help file about it (but that just may be because I didn't know how to look it up).

Rex, is this a feature?

HELP QMARK

(You can use the ? command to prompt whether or not to execute the ? command: ?? will display a list of internal commands or not, at the user's option. Oddly enough, ? appears to be the only internal command which does not recognize the /? option....)
 

rconn

Administrator
Staff member
May 14, 2008
12,340
149
> I discovered quite accidentally that a command with a leading question
> mark (but not a single isolated question mark) asks the user whether to
> execute the command.
>
> E.g.,
> > ?foo
> foo (Y/N)? Y
> TCC: Unknown command "foo"
>
> > ?echo food
> echo food (Y/N)? Y
> food
>
> > ?echo drink
> echo drink (Y/N)? N
>
> (nothing)
>
> This works if the command is in a .bat or .btm file, too.
>
> I have no alias named "?".
>
> I couldn't find anything in the help file about it (but that just may
> be because I didn't know how to look it up).
>
> Rex, is this a feature?

Yes, a very, very, very old one -- for compatibility with DR-DOS.

It's documented under the "?" command.

Rex Conn
JP Software
 

rconn

Administrator
Staff member
May 14, 2008
12,340
149
> (You can use the ? command to prompt whether or not to execute the ?
> command: ?? will display a list of internal commands or not, at the
> user's option. Oddly enough, ? appears to be the only internal command
> which does not recognize the /? option....)

Neither does REM. Since neither have arguments, there's not much point in
displaying help for them.

Rex Conn
JP Software
 
Jun 2, 2008
376
2
Newton, MA
When I enter "?" on the command line and then press F1, I get an error
message "This program cannot display the webpage."

Perhaps even worse, when I select the "?" command, the help for DETACH
comes up instead.

TCC 11.00.40 x64 Windows 7 [Version 6.1.7600]
TCC Build 40 Windows 7 Build 7600

-- Jay
 
Jun 2, 2008
376
2
Newton, MA
Correction. I wrote:

> Perhaps even worse, when I select the "?" command,
> the help for DETACH comes up instead.

It turned out I was not selecting the "? (command)" help entry but the
plain "?" entry (the two are not next to each other). Help for the
latter, indeed, does not work.

-- Jay
 

rconn

Administrator
Staff member
May 14, 2008
12,340
149
> When I enter "?" on the command line and then press F1, I get an error
> message "This program cannot display the webpage."

This is a Windows Help issue; nothing I can do about it.


> Perhaps even worse, when I select the "?" command, the help for DETACH
> comes up instead.

Not reproducible here.

Rex Conn
JP Software
 
May 20, 2008
603
0
Sammamish, WA
> Perhaps even worse, when I select the "?" command, the help for DETACH


> > comes up instead.
> ---End Quote---
> Not reproducible here.
>
>
I can.

From TCC within TCMD, I type HELP then in the Index tab, I double click the
? that's in between .XOR. and _? and DETACH comes up.


TCC 11.00.40 Windows XP [Version 5.1.2600]
TCC Build 40 Windows XP Build 2600 Service Pack 3


--
Jim Cook
2010 Sundays: 4/4, 6/6, 8/8, 10/10, 12/12 and 5/9, 9/5, 7/11, 11/7.
Next year they're Monday.
 

rconn

Administrator
Staff member
May 14, 2008
12,340
149
> From TCC within TCMD, I type HELP then in the Index tab, I double click
> the ? that's in between .XOR. and _? and DETACH comes up.

That's not the ? command, that's the ? character -- which in Windows Help
will match any topic that has a single character in its text. (Not very
useful, but direct your complaints to Microsoft!)

Rex Conn
JP Software
 
Aug 9, 2009
228
1
V8 4nt

In a batchfile if you were to do this

? "Load firefox" firefox.exe

it would prompt (Y/N) to load

out side of a batchfile it behaves as you'd expect listing internal commands
and plugins

Hope this clears this annoying little thread up :)

-----Original Message-----
Subject: RE: [Support-t-1759] Leading question mark in command


---Quote---

> From TCC within TCMD, I type HELP then in the Index tab, I double click
> the ? that's in between .XOR. and _? and DETACH comes up.
---End Quote---
That's not the ? command, that's the ? character -- which in Windows Help
will match any topic that has a single character in its text. (Not very
useful, but direct your complaints to Microsoft!)

Rex Conn
JP Software
 
Similar threads
Thread starter Title Forum Replies Date
vefatica Setting array variable ignores leading spaces (and @execarray doesn't) Support 4
vefatica Why does @WSLPATH double the leading '/'? Support 7
Alpengreis A leading withespace in Hash-String is not included? Support 1
vefatica WAD @FILEREADB outputs a leading space ... Support 2
vefatica Leading spaces in array variables Support 13
C Can't remove leading quote from a string Support 2
C forum Posting Question... Support 3
C question re: Move Support 3
S How to? Upgrade Question: What supporting documentation is required at time of purchase? Support 2
Peter Murschall Documentation Question to %@PSHELL Support 4
Fross Tab Question Support 6
Fross Quick Function Question Support 17
Dick Johnson Question about the Touch command Support 0
rps Documentation "Copy+Paste+run" question Support 2
vefatica SFTP question Support 17
vefatica Question about IPWorks Support 0
C How to? SHORTCUT question..... Support 6
vefatica TPIPE, crash and question Support 1
C Question / Suggestion Support 1
MickeyF Another TPIPE question Support 6
vefatica Another @EVERYTHING question Support 4
mikea How to? %@everything[] question Support 10
A License Question for Single User Support 5
Jay Sage Help Correction (and Related Question) Support 0
S Elapsed time in TCC prompt question Support 0
H command line parsing question Support 5
C Forum question Support 2
B Newbie here, I have a question. Support 4
J Dumb Question ... Support 4
Timothy Byrd Updating from TC 9 to TC 17 - TCTOOLBAR question Support 2
M A possibly stupid question about the "del" command... Support 7
M A just out of curiosity question re @DiskTotal Support 4
Fross Status Bar Time Question Support 1
A Stupid, obvious question - launch a BAT with TC Support 10
C How to? GLOBAL question Support 5
vefatica OT: VisualStudio question Support 1
vefatica Wildcard question Support 4
Dan Glynhampton v15 installer question Support 2
C Move question with Encrypted file... Support 6
M Maybe Maybe I'm being stupid (again), but a simple question... Support 4
C Message Board question Support 1
James Miller How to? filename completion question Support 1
C coding question Support 3
M A just-out-of-curiosity question because it's ... Support 6
Frank question to FOLDERMONITOR Support 14
C Dumb titleprompt question Support 4
M Upgrade Question Support 2
S option /u question Support 19
M How to? A probably stupid question re "@Files" and Include Lists... Support 2
M Just an out-of-curiosity question re. "Do ... /P ..." Support 31

Similar threads