Leading question mark in command

  • This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.
May 29, 2008
517
3
Groton, CT
#1
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
3,385
39
Albuquerque, NM
prospero.unm.edu
#2
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
10,103
85
#3
> 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
10,103
85
#4
> (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
284
1
Newton, MA
#5
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
284
1
Newton, MA
#6
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
10,103
85
#7
> 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
 
#8
> 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
10,103
85
#9
> 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
133
0
#10
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