Search found 5 matches

by aschipfl
23 Nov 2020 18:31
Forum: DOS Batch Forum
Topic: Comand line and special character
Replies: 2
Views: 897

Re: Comand line and special character

ÿÿÿÿÿ is the relay ID and is the problem whe nusing inside a .BAT file. I bet the character ÿ has got the code 0xFF, which is seen as the non-break space (NBSP) and constitutes a standard token separator, just like: SPACE TAB , ; = VTAB FF . I guess escaping each by ^ like ^ÿ^ÿ^ÿ^ÿ^ÿ is not going t...
by aschipfl
22 Nov 2020 09:02
Forum: DOS Batch Forum
Topic: Limited number of CALLs per line?
Replies: 4
Views: 1039

Re: Limited number of CALLs per line?

All can be explained once you understand how CALL/GOTO scan for labels. The label scanner reads until \r\n is found, or 512 bytes, whichever comes first. The code that has no error has the following at line position 1024: <space>:SUB So the label is found, and the routine starts on the next line (a...
by aschipfl
21 Nov 2020 16:14
Forum: DOS Batch Forum
Topic: Alternate method to get TAB, Carriage return and possibly all others
Replies: 35
Views: 14378

Re: New Universal method to get TAB, Carriage return and possibly all others

For the get the CR I not found this excellent: for /F %%Z in ('copy /Z "%~dpf0" nul') do set "CR=%%Z" Because it fails if the batch script have the readonly attribute. More details here: https://www.dostips.com/forum/viewtopic.php?f=3&t=4741&start=90#p40757 This is a very interesting finding. Also ...
by aschipfl
21 Nov 2020 14:51
Forum: DOS Batch Forum
Topic: Alternate method to get TAB, Carriage return and possibly all others
Replies: 35
Views: 14378

Re: Alternate method to get TAB, Carriage return and possibly all others

Hello, seems nobody has yet mentioned the FORFILES command with its nice 0xHH hex code feature. :idea: I use it for getting the TAB character, but it works for almost all characters except CR and LF: for /F "delims=" %%T in ('forfiles /P "%~dp0." /M "%~nx0" /C "cmd /C echo/0x09"') do set "TAB=%%T" I...
by aschipfl
21 Nov 2020 14:18
Forum: DOS Batch Forum
Topic: Limited number of CALLs per line?
Replies: 4
Views: 1039

Limited number of CALLs per line?

Hello, I just encountered a very strange behaviour of the CALL command (on my Windows 7 x64 machine) when it tries to call a non-existent label and appears quite a number of times in a line: :o @echo off ::The following contains 85 times `call :SUB` and complaints about a missing label as expected. ...