New lines not created by #13#10
Eröffnet am: 2016-08-01 19:00
Letztes Update: 2017-06-03 22:41
Auswertung: | (Anonym) | Verantwortlicher: | (Keine) |
---|---|---|---|
Priorität: | 5 - Mittel | Meilenstein: | (Keine) |
Typ: | Fehler | Schweregrad: | 5 - Mittel |
Komponente: | (Keine) | Status: | Offen |
Lösung | Keine |
Einzelheiten
According to chapter "About new line characters" in appendix of the help file, the newline is created by #13#10 (assuming I'm on windows machine). as i want a proper logfile that is readably by humans, i intend to give some extra output to the screen and therefore to the logging file.
But newlines are acheived neither by adding #13#10 nor adding 13 10 to the dispstr command, instead those characters are completely omitted. if more #10 are added, it seems to work for the first "#13#10#10" sequence. pelase see code below for example
This happens in TT 4.89 and 4.91.
- intdim baudrates 15;define array
- baudrates[0]=921600
- baudrates[1]=460800
- baudrates[2]=230400
- baudrates[3]=115200
- ...
- ;turn on logging for file examination
- for baud 014
- if baudrates[baud]<>0then
- setbaud baudrates[baud]
- ;display current baud test on screen
- int2str sBaud baudrates[baud]
- dispstr '+++ ... testing baud= ' sBaud #13#10 ;ERROR gives no newline-characters
- dispstr '+++ ... testing baud= ' sBaud #13#10#13#10 ;ERROR gives no newline-characters
- dispstr '+++ ... testing baud= ' sBaud #13#10#10 ;gives: CR+LF
- dispstr '+++ ... testing baud= ' sBaud #13#10#10#10 ;gives: CR+LF+LF
- mpause 250
- flushrecv
- mpause 100
- sendln 'cmd'
- wait'response1'
- mpause 250
- if result >0then
- goto ConnectionEstablished
- endif
- endif
- next
Kommentar
I think the order matters. The following works for me on TTerm 4.96. Cheers, fwj