- Aug
- 2,058
- 83
Code:
_x64: 1
_admin: 1
_elevated: 1
TCC 25.00.20 x64 Windows 10 [Version 10.0.18362.356]
I have a text file, with every second line indented with a tab.
When the array is loaded from a text file, and the elements are echoed, all is well.
That is, the tabs are echoed to the screen.
When the array is loaded from the clipboard, and the elements are echoed, all is not well.
That is, the tabs are not echoed to the screen, nor anything following the tab.
Is this WAD?
Joe
Code:
@echo off
::
:: Display lines 466 to 477 of notes.txt
::
tail /n14 notes.txt | head /n12
echo %@repeat[*,25]
::
::This works as it should
:: Input is from a text file
::
setarray /F aNotes[500]
echo Array has %@filearray[aNotes,notes.txt] elements.
do Element=466 to 477
echo %aNotes[%Element]
enddo
echo %@repeat[*,25]
::
::Put the file on the clipboard
::
type notes.txt > clip:
::
::
::This does not work as it should
:: Input is from the clipboard
::
setarray /F aNotes[500]
echo Array has %@filearray[aNotes,clip:] elements.
do Element=466 to 477
echo %aNotes[%Element]
enddo
echo %@repeat[*,25]
quit
Partial Hex dump of notes.txt
Code:
0000 36f0 32 30 31 39 2d 31 31 2d 30 31 20 31 36 3a 30 30 2019-11-01 16:00
0000 3700 3a 33 36 2e 30 36 3a 0d 0a 09 32 32 38 6d 62 0d :36.06:...228mb.
0000 3710 0a 32 30 31 39 2d 31 31 2d 30 31 20 31 37 3a 30 .2019-11-01 17:0
0000 3720 30 3a 34 39 2e 32 35 3a 0d 0a 09 33 32 31 6d 62 0:49.25:...321mb
0000 3730 0d 0a 32 30 31 39 2d 31 31 2d 30 31 20 31 38 3a ..2019-11-01 18:
0000 3740 30 33 3a 35 39 2e 39 39 3a 0d 0a 09 33 33 38 6d 03:59.99:...338m
0000 3750 62 0d 0a 32 30 31 39 2d 31 31 2d 30 31 20 32 31 b..2019-11-01 21
0000 3760 3a 30 35 3a 34 37 2e 39 36 3a 0d 0a 09 33 39 37 :05:47.96:...397
0000 3770 6d 62 0d 0a 32 30 31 39 2d 31 31 2d 30 32 20 20 mb..2019-11-02
0000 3780 39 3a 33 30 3a 30 30 2e 36 38 3a 0d 0a 09 35 35 9:30:00.68:...55
0000 3790 33 6d 62 0d 0a 32 30 31 39 2d 31 31 2d 31 34 20 3mb..2019-11-14
0000 37a0 20 38 3a 32 34 3a 34 34 2e 34 36 3a 0d 0a 09 32 8:24:44.46:...2
Output of test3.btm
Code:
e:\utils>test3.btm
2019-11-01 16:00:36.06:
228mb
2019-11-01 17:00:49.25:
321mb
2019-11-01 18:03:59.99:
338mb
2019-11-01 21:05:47.96:
397mb
2019-11-02 9:30:00.68:
553mb
2019-11-14 8:24:44.46:
201.65 62
*************************
Array has 480 elements.
2019-11-01 16:00:36.06:
228mb
2019-11-01 17:00:49.25:
321mb
2019-11-01 18:03:59.99:
338mb
2019-11-01 21:05:47.96:
397mb
2019-11-02 9:30:00.68:
553mb
2019-11-14 8:24:44.46:
201.65 62
*************************
Array has 481 elements.
ECHO is OFF
2019-11-01 16:00:36.06:
ECHO is OFF
2019-11-01 17:00:49.25:
ECHO is OFF
2019-11-01 18:03:59.99:
ECHO is OFF
2019-11-01 21:05:47.96:
ECHO is OFF
2019-11-02 9:30:00.68:
ECHO is OFF
2019-11-14 8:24:44.46:
*************************