No blank line in TEXT...ENDTEXT in a LIBRARY function

Code:
     _x64: 1
   _admin: 1
_elevated: 1

TCC  26.01.40 x64   Windows 10 [Version 10.0.18362.836]

Can anyone duplicate this?

When using TEXT..ENDTEXT in a LIBRARY function, I cannot get a blank line. Example;

Code:
Test {
text
1

2

3
endtext
}
...returns...
Code:
e:\utils>which test
test is a library function

e:\utils>test
text
1
2
3

FONT for both TCMD and TCC;
Code:
e:\utils>echo %@font[0] %@font[1] %@font[2] %@font[3] %@font[4] %@font[5]
Consolas 15 32 700 54 0

Joe
 
May 20, 2008
11,400
99
Syracuse, NY, USA
No surprise. Blank lines are removed when library routines are stored in memory.

Code:
d:\data\tcclibrary> type test.btm
test {
text
1

2

3
endtext
}

d:\data\tcclibrary> library /u /r test.btm

d:\data\tcclibrary> library /f test
test {
text
1
2
3
endtext
}
 
May 20, 2008
11,400
99
Syracuse, NY, USA
TCC strips all leading & trailing whitespace from the line. If the line is (then) empty, TCC doesn't save it in memory. If you want to display blank lines, use escape sequences.
How, exactly? Neither of these, ^r^n and ^e[0m, seem to work.

LIBRARY /F
Code:
COMMENT
for  i = 0, 1, 2, ...^r^n
s[i]   = process name
s[i+1] = process start time as YYYYMMDDHHMMSS.uuuuuu±ZZZ
^e[0m
s[i+2] = process ID
ENDCOMMENT

If I can get a real ESC in there (not easy with my editor) it'll work.

EDITOR:
1594482458322.png


LIBRARY /F
Code:
COMMENT
for  i = 0, 1, 2, ...
s[i]   = process name
s[i+1] = process start time as YYYYMMDDHHMMSS.uuuuuu±ZZZ

s[i+2] = process ID
ENDCOMMENT
 

ben

Jan 3, 2012
44
6
UK
In TextPad you can replace a character with escape, in regex mode, using \x1b . Tedious, but possible.
 
Similar threads
Thread starter Title Forum Replies Date
R Long commands retrieved from command history have blank line when wrapped Support 20
vefatica IDE - when breakpoint is on a blank line? Support 3
Joe Caverly PSHELL Blank Line Display Support 2
A TCMD - Dir Command puts out blank lines? Support 16
D Range command dialog with blank maximum size erases everything Support 5
rjperrella start /tabna leaves blank windows when running batch scripts Support 10
D Blank lines in jpstree.idx Support 3
R Button label is blank - 11.00.48 Support 0
J Extra blank lines during paste Support 6
T VIEW only works from command line Support 14
vefatica `Back quotes` - command line vs. batch file Support 5
Phileosophos Is there any way to open the Take Command options dialog from the command line? Support 8
Phileosophos Command-line Editing Shortkeys That Fail Support 6
D How to use multi-line DO to loop through first level directory names Support 5
D Open Windows 10 Photos app from command line Support 11
Peter Murschall Single-line Do-CMD is a bit uncooperative. Support 6
Jesse Heines Strange Line Wrapping Behavior Support 14
fpefpe How to? command echo in title line/bar Support 2
vefatica Command line DO with no closing parenthesis? Support 9
M No line wraps if last line of the screen buffer is reached Support 5
R CMDebug, dark theme, current line Support 7
D Double Quote in TC Tool Bar Button Command line Support 3
Joe Caverly Expand all aliases on the command line Support 2
vefatica How do I do this with a multiple-line DO? Support 7
Jay Sage Cannot Postion Cursor in Command Line Using Mouse Support 7
vefatica Windows 10 and line wrapping selection? Support 6
vefatica IDE.EXE's command line? Support 19
x13 TPIPE /REPLACE - Remove line (including EOL) Support 3
D btm file command line augments comparing for string or math. Support 12
D Grabbing html text with @line Support 3
Chen Touboul Overtyping issue - i press the Insert key, help till press enter for new line in TCC Support 2
vefatica FFIND and multi-line regular expressions Support 4
P Escape key no longer clears command line in v24 Support 21
J File explorer handling from command line? Support 2
M Ctrl-C when using command line history does nothing Support 2
M Command line parsing differences between cmd.exe and TCC Support 6
C Replace 1st argument on command line Support 4
vefatica Library functions and line continuations? Support 4
Joe Caverly Works in debugger, not from cmd line Support 1
P No linefeed on last line of console window Support 2
K Command Line Selection Not Working Support 12
J Error running Python at command line Support 9
rps How to? Alias/Command line use of *log on/off Support 2
x13 //directive ignored on TCC command-line Support 4
Joe Caverly Unicode, Codepage 437, and line characters Support 3
J How to? max. practical command line length? Support 3
mfarah WAD Odd behaviour with command-line arguments on TCMD. Support 7
T Regex engine doesn't recognize native DOS line endings Support 2
thorntonpg F1 on command line The webpage cannot be found Support 5
J Python: TCC command line parsing removes '=' equal sign characters Support 4

Similar threads