| ||
> > SET "P1=AAAABBBBBBBB DDDDDDDDDDDDDDDDDAAAAAAAAAAAAAAAAA" needs double quotes (as in my example). (2) You're missing the CALL before the ECHO (again, see my example) > >must double-up all those percent > but i have this problem, not a problem but more of the definitions that > are going around > 1. sometimes % works in F9 without adding more % > 2. sometimes % works in F9 with adding 1 more % > 3. sometimes % works in F9 with doubling it > i always try 1. 2. 3. Nope, only 3. is correct. To make my example work in [F9] Menu, you would need to copy and paste it, then double-up the percent signs, as follows:- Don't forget to use CALL ECHO > SetLocal EnableExtensions EnableDelayedExpansion > SET AA=50 > ECHO !P1:~0,%%AA%%! > it worked in F9, but DelayedExpansion interferes with the data with > "!" so badly, this is my last resort to use. Yes, avoid EnableDelayedExpansion for the reason you've given -- there's no need for it in this particular case. > > using it SET "A=123" instead of SET A=123 I admit that double quoting SET A=123 is unnecessary -- I do it out of habit. But try running this line without double quotes:- It definitely needs to be:-
Hope this helps. Just so you know, I would never send you (or anybody) any code examples if I hadn't tested them first.
| ||
|
Thread locked
Messages in this Thread
- [Q] N=20, ECHO %%%P1:~0,%%N%%%%, how can i make it work? [Bug?] (1,131) - Ryan - Aug 28,2017 at 14:28 [Q]
- the view number can not be this high, posted it maybe 2 hours ago (1,203) - Ryan - Aug 28,2017 at 18:14
- the view number can not be this high, posted it maybe 2 hours ago (965) - Peter Shute - Aug 28,2017 at 22:14
- the view number can not be this high, posted it maybe 2 hours ago (979) - Ryan - Aug 29,2017 at 00:06
- the view number can not be this high, posted it maybe 2 hours ago (965) - Peter Shute - Aug 28,2017 at 22:14
- [Q] N=20, ECHO %%%P1:~0,%%N%%%%, how can i make it work? [Bug?] (955) - Nick Williams - Aug 29,2017 at 01:02
- adding 1 more %, doubling it, still dont work, so i was wondering if it was bug (991) - Ryan - Aug 29,2017 at 03:59
- adding 1 more %, doubling it, still dont work, so i was wondering if it was bug (986) - Nick Williams - Aug 29,2017 at 20:19
- my head ignored "call" in all batches..... (957) - Ryan - Aug 30,2017 at 01:57
- No problem at all. Hopefully you can make progress now (nomsg) (942) - Nick Williams - Aug 30,2017 at 06:20
- my head ignored "call" in all batches..... (957) - Ryan - Aug 30,2017 at 01:57
- Understanding multiple percent signs (1,059) - Oliver Pretzel - Aug 30,2017 at 12:46
- Thank you VERY much for this. Clear, concise, and informative. (998) - Doug Borg - Aug 31,2017 at 16:52
- Understanding multiple percent signs (913) - Hartmut Schneider - Nov 14,2017 at 05:33
- adding 1 more %, doubling it, still dont work, so i was wondering if it was bug (986) - Nick Williams - Aug 29,2017 at 20:19
- adding 1 more %, doubling it, still dont work, so i was wondering if it was bug (991) - Ryan - Aug 29,2017 at 03:59
- the view number can not be this high, posted it maybe 2 hours ago (1,203) - Ryan - Aug 28,2017 at 18:14