Welcome!

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

SignUp Now!

almost converted to TCC

Apr
57
0
Moving right along getting my TCC working the same as my 4DOS thanks to the help here. But the absence of a pseudovariable for 'Parameter' seems like an omission. I presume Rex has a reason for this, but I'm curious what it might be.

Also, I'm finding keyboard aliases do most of what I want, but there are gaps, like 'Alt+UpArrow' can't be aliased. I'm using AutoHotkey for those, but if TCC handled them native, I'd need no other resources outside TCC to achieve symmetry between 4DOS and TCC, which would be as smooth as a baby's bum.
 
| Moving right along getting my TCC working the same as my 4DOS thanks
| to the help here.

Glad to hear it.

| But the absence of a pseudovariable for
| 'Parameter' seems like an omission. I presume Rex has a reason for
| this, but I'm curious what it might be.

Actually Rex deprecates the use of the pseudovariables for CommandSep
and EscapeChar. Removing the flexibility of choosing your own characters
would make command parsing simpler, but anyone who calls third-party
programs from the command line the lack of flexibility would be a great
hindrance if such a program considers any character special.
BTW, one other change since 4DOS that I forgot to mention is the
handling of the equal sign =. To imitate changes in CMD.EXE parsing, the
strings on each side of an equal sign = are considered different command
parameters, e.g.
make a=b
is parsed as follows:
parameter 0 make
parameter 1 a
parameter 2 b

There are external programs to which one must deliver the parameters with
embedded = sign, so beware!

--
HTH, Steve
 
Actually Rex deprecates the use of the pseudovariables for CommandSep
and EscapeChar. Removing the flexibility of choosing your own characters
would make command parsing simpler, but anyone who calls third-party
programs from the command line the lack of flexibility would be a great
hindrance if such a program considers any character special.


BTW, one other change since 4DOS that I forgot to mention is the
handling of the equal sign =. To imitate changes in CMD.EXE parsing, the
strings on each side of an equal sign = are considered different command
parameters, e.g.
make a=b
is parsed as follows:
parameter 0 make
parameter 1 a
parameter 2 b

HTH, Steve

Steve,

Trying to go back to the 4DOS situation, I tried to enter 'Ctrl+X'
as the EscapeChar, but the input box showed nothing. Since I want the caret for CommandSep, I've got the tilde right now for EscapeChar, but that's probably dumb. Can I get Ctrl+X back? Or can I use the caret there too with no conflicts?

Tx. for info on equal sign.
 
This should put a ^X in your clipboard, and then you can paste it into the
box.
echos %@char[24] > clip:


On Sat, May 22, 2010 at 8:34 PM, rayandrews <> wrote:


> ---Quote (Originally by Steve Fábián)---
> Actually Rex deprecates the use of the pseudovariables for CommandSep
> and EscapeChar. Removing the flexibility of choosing your own characters
> would make command parsing simpler, but anyone who calls third-party
> programs from the command line the lack of flexibility would be a great
> hindrance if such a program considers any character special.
>
>
> BTW, one other change since 4DOS that I forgot to mention is the
> handling of the equal sign =. To imitate changes in CMD.EXE parsing, the
> strings on each side of an equal sign = are considered different command
> parameters, e.g.
> make a=b
> is parsed as follows:
> parameter 0 make
> parameter 1 a
> parameter 2 b
>
> HTH, Steve
> ---End Quote---
> Steve,
>
> Trying to go back to the 4DOS situation, I tried to enter 'Ctrl+X'
> as the EscapeChar, but the input box showed nothing. Since I want the caret
> for CommandSep, I've got the tilde right now for EscapeChar, but that's
> probably dumb. Can I get Ctrl+X back? Or can I use the caret there too
> with no conflicts?
>
> Tx. for info on equal sign.
>
>
>
>
>



--
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.
 
| Trying to go back to the 4DOS situation, I tried to enter 'Ctrl+X'
| as the EscapeChar, but the input box showed nothing. Since I want
| the caret for CommandSep, I've got the tilde right now for
| EscapeChar, but that's probably dumb. Can I get Ctrl+X back? Or
| can I use the caret there too with no conflicts?

1/ You cannot use the same character for both EscapeChar and CommandSep.
2/ If you use an editor to modify your .INI file, make sure that the editor
creates a line like this:
EscapeChar=↑
(ctrl-X entered above using the old technique of holding down the ALT key,
entering 23 on the numeric keypad, releasing ALT)
3/ Using SETDOS you can use the command below:
SETDOS /E%@char[24]

Both 2/ and 3/ utilize the fact that the actual escape character is the one
whose code is 24, and its name in the ASCII table is CAN (cancel), with
ctrl-X just the method of generating the code on a standard keyboard. I
normally use method 2/.
--
HTH, Steve
 
On Sat, May 22, 2010 at 9:04 PM, Steve Fábián <> wrote:


> EscapeChar=↑
> (ctrl-X entered above using the old technique of holding down the ALT key,
> entering 23 on the numeric keypad, releasing ALT)
> 3/ Using SETDOS you can use the command below:
> SETDOS /E%@char[24]
>
>
Of course you meant ALT key, 24 .... Great suggestion; I forgot about that
method. I hardly use it any more. I always wished NUL (0) was possible with
it -- the one code that wasn't recognized.

--
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.
 
Jim, Steve,

2/ If you use an editor to modify your .INI file, make sure that the editor
creates a line like this:
EscapeChar=↑
(ctrl-X entered above using the old technique of holding down the ALT key,
entering 23 on the numeric keypad, releasing ALT)
3/ Using SETDOS you can use the command below:
SETDOS /E%@char[24]

Both 2/ and 3/ utilize the fact that the actual escape character is the one
whose code is 24, and its name in the ASCII table is CAN (cancel), with
ctrl-X just the method of generating the code on a standard keyboard. I
normally use method 2/.
--
HTH, Steve

I couldn't find an editor that would let me use /2 above, and it bugs me that I'd have to use /3, since it seems to me that the .ini should be able to set me up completely. Jim's string didn't work but I fiddled with it until I found one that did:

echo %@clipw[%@char[24]]

... and then I pasted it in wordpad.

A bit of an ordeal :(

This is the sort of thing I was worried about when deciding whether to stay with my 4DOS .btms or convert to the newer standards.

Seems to me that Rex should have some way of letting us enter ^X (or whatever other non printing char) in the 'Options' boxes without these workarounds. I expect that Windows itself will have somthing to say about it, but there should be a way IMHO.
 
3/ Using SETDOS you can use the command below:
SETDOS /E%@char[24]

Or even

Code:
setdos /e24

or

Code:
setdos /e0x18

Either accomplishes the same thing, but without the need to insert funky characters into a text file.
 
2/ If you use an editor to modify your .INI file, make sure that the editor
creates a line like this:
EscapeChar=↑
(ctrl-X entered above using the old technique of holding down the ALT key, entering 23 on the numeric keypad, releasing ALT)

You can also use decimal ASCII codes in the .INI file, e.g.

Code:
EscapeChar=24

(Hexadecimal codes, e.g. 0x18, aren't supported in this context.)
 
You can also use decimal ASCII codes in the .INI file, e.g.

Code:
EscapeChar=24
(Hexadecimal codes, e.g. 0x18, aren't supported in this context.)

Charles,

Yup that succeeded for entering the char, alas, it seems not to actually work. I tried "echo 2 is > than 4" with ASCII 24 as my EscapeChar and it redirected "2 is" into the file "4" :(

So it's back to the tilde as my EscapeChar.

Unless I'm missing something.
 
Yup that succeeded for entering the char, alas, it seems not to actually work. I tried "echo 2 is > than 4" with ASCII 24 as my EscapeChar and it redirected "2 is" into the file "4" :(

Oh, yeah.... Control-X is also the default key to expand variables on the command line. You can defeat that with a directive in your .INI file:

Code:
NormalKey=Ctrl-X
 
Oh, yeah.... Control-X is also the default key to expand variables on the command line. You can defeat that with a directive in your .INI file:

Code:
NormalKey=Ctrl-X

Yeah, but then I'd need another key for expansion and there'd be even more falling dominos as keys displace other keys. I'll just use the tilde for now, since that won't screw up too many of my .btms. BTW, just as a fine point, I notice that I can do this:

echo I'm using ~~ as my EscapeChar

and it's shows as you'd expect (first tilde escapes the second), but how do I do this:

echo The tilde looks like this ~~

At the end of the line the tilde seems to indicate line continuation.
But I'll bet it can be done.
 
On Sun, 23 May 2010 14:20:18 -0400, rayandrews <> wrote:

|but how do I do this:
|
| echo The tilde looks like this ~~
|
|At the end of the line the tilde seems to indicate line continuation.
|But I'll bet it can be done.

Gee wiz! Didn't they teach you to end a sentence with a period? :-)

v:\> setdos /e~

v:\> echo The tilde looks like this: ~~.
The tilde looks like this: ~.

Of more general value is:

v:\> echo The tilde looks like this: ~~``
The tilde looks like this: ~

--
- Vince
 
I paste the code from the char[] into option instead of editing the
ini directly and have had good luck with that.

However I use %= instead of the escape character. You might need A
normalchar override in the ini to make the ^X work.

Sent from Cookie's iPhone
Jim Cook

On May 23, 2010, at 9:30, rayandrews <> wrote:


> ---Quote (Originally by Charles Dye)---
> You can also use decimal ASCII codes in the .INI file, e.g.
>
>
> Code:
> ---------
> EscapeChar=24
> ---------
> (Hexadecimal codes, e.g. 0x18, aren't supported in this context.)
> ---End Quote---
> Charles,
>
> Yup that succeeded for entering the char, alas, it seems not to
> actually work. I tried "echo 2 is > than 4" with ASCII 24 as my
> EscapeChar and it redirected "2 is" into the file "4" :(
>
> So it's back to the tilde as my EscapeChar.
>
> Unless I'm missing something.
>
>
>
>
 
----- Original Message -----
From: "rayandrews" <>
To: <[email protected]>
Sent: 2010. May 23., Sunday 12.30
Subject: RE: [Support-t-1988] Re: almost converted to TCC



> ---Quote (Originally by Charles Dye)---
> You can also use decimal ASCII codes in the .INI file, e.g.
>
>
> Code:
> ---------
> EscapeChar=24
> ---------
> (Hexadecimal codes, e.g. 0x18, aren't supported in this context.)
> ---End Quote---
> Charles,
>
> Yup that succeeded for entering the char, alas, it seems not to actually
> work. I tried "echo 2 is > than 4" with ASCII 24 as my EscapeChar and it
> redirected "2 is" into the file "4" :(
>
> So it's back to the tilde as my EscapeChar.
>
> Unless I'm missing something.

As someone else pointed out you missed my remarks relating to the
VariableExpand directive. IIIRC I mentioned I use ctrl-Y for that purpose.

There is another method you can use to edit your .INI file: TCC's @INIWRITE
function:
set dummy=%@iniwrite[%_ininame,4NT,EscapeChar,%@char[24]]
--
HTH, Steve
 
On Sun, 23 May 2010 14:20:18 -0400, rayandrews <> wrote:

|
Of more general value is:

v:\> echo The tilde looks like this: ~~``
The tilde looks like this: ~

--
- Vince

Yep, that's got it, just need a dummy character at the end of the line.
For me, solving these little things is a matter of principal of course, not a matter of practical concern, but a good computer syntax has no 'holes' -- there should be nothing that can't be stringified, so the above, tho perhaps not as elegant as it might be, solves the issue.
 
----- Original Message -----

<[email protected]>VariableExpand directive. IIIRC I mentioned I use ctrl-Y for that purpose.

There is another method you can use to edit your .INI file: TCC's @INIWRITE
function:
set dummy=%@iniwrite[%_ininame,4NT,EscapeChar,%@char[24]]
--
HTH, Steve

Steve,

I want to keep these chains of displaced keys and characters to a minimum so I'll leave ^X stock and just use the tilde for EscapeChar for now. I've got my .btms more or less working so now I can learn the prog properly while actually using it. So much to know, it's a bit of a blur right now.

At this point, my only remaining dissatisfaction is that I can't take total command of the keyboard, eg. Alt+Up'.

</[email protected]>
 
On Mon, 24 May 2010 10:42:46 -0400, rayandrews <> wrote:

|Yep, that's got it, just need a dummy character at the end of the line.
|For me, solving these little things is a matter of principal of course, not a matter of practical concern, but a good computer syntax has no 'holes' -- there should be nothing that can't be stringified, so the above, tho perhaps not as elegant as it might be, solves the issue.

This is a little less inelegant:

v:\> echo The tilde looks like this: `~~`
The tilde looks like this: ~
--
- Vince
 
----- Original Message -----
From: "Jim Cook" <>

> Of course you meant ALT key, 24 .... Great suggestion; I forgot about that
> method. I hardly use it any more. I always wished NUL (0) was possible
> with
> it -- the one code that wasn't recognized.

Of course you were correct about the code value.
I use alt+kp0 frequently to type my name with its diacritical marks. Of
course, when I work in Hungarian, I use an alternate keyboard code.
I am answering late because my primary system is down, and my email is
not automatically sorted into 50+ folders.
--
Steve
 

Similar threads

Back
Top