Recent

Author Topic: Strange behavior of tab character  (Read 574 times)

simsee

  • Full Member
  • ***
  • Posts: 235
Strange behavior of tab character
« on: November 30, 2025, 05:27:09 pm »
Why does writeln sometimes display the tab character (ascii #9) in a string with a little circle, instead of performing a character gap?

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 12715
  • FPC developer.
Re: Strange behavior of tab character
« Reply #1 on: November 30, 2025, 05:30:28 pm »
Probably you output it with stdout in RAW mode.

simsee

  • Full Member
  • ***
  • Posts: 235
Re: Strange behavior of tab character
« Reply #2 on: November 30, 2025, 05:33:09 pm »
This happens in one of my apps, but not in others. What setting affects this behavior?

jamie

  • Hero Member
  • *****
  • Posts: 7602
Re: Strange behavior of tab character
« Reply #3 on: November 30, 2025, 05:49:07 pm »
canvas.Textout Does not support a TAB, you must emulate it,

WriteStr, Write and WriteLn should work, however.

If those are not working then yes, something is amidst !


The only true wisdom is knowing you know nothing

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 12715
  • FPC developer.
Re: Strange behavior of tab character
« Reply #4 on: November 30, 2025, 05:55:22 pm »
This happens in one of my apps, but not in others. What setting affects this behavior?

You don't give much information, but units like CRT or VIDEO (used anywhere in the program!) might have such effect.

simsee

  • Full Member
  • ***
  • Posts: 235
Re: Strange behavior of tab character
« Reply #5 on: November 30, 2025, 06:58:55 pm »
For some reason, I had unnecessarily included Crt in the uses clause of the unit where writeln was exhibiting this strange behavior with tab. I'm under Windows. Removing the inclusion solved the problem. Thanks Marcov!

 

TinyPortal © 2005-2018