Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

Leading question mark in command

May
572
4
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?
 
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....)
 
> 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
 
> (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
 
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
 
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
 
> 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.
 
> 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
 
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

Back
Top