Recent

Author Topic: Strange problem with 'enter' key  (Read 1873 times)

Konstwor

  • Newbie
  • Posts: 1
Strange problem with 'enter' key
« on: February 24, 2018, 11:31:35 am »
Hello! I'm quite new to programming in general therefore this question might seem ridiculous but it really bugs me.
I've been away from home for about a week and now when I'm back and ready to practice typing my 'writeln' and 'readln' I have this:
every time I type something in the 'working programme window' (the compile one) and press Enter my cursor moves back to the position of the first symbol; then after the second press of 'enter' the next line from 'writeln' appears at the place of the one I was typing.
Not sure how to show it correctly.
I've tried a few variations of code and it seems like that's not the problem and I have completely no idea what is.
Help me, please, wise and kind people!

Ñuño_Martínez

  • Hero Member
  • *****
  • Posts: 1186
    • Burdjia
Re: Strange problem with 'enter' key
« Reply #1 on: February 24, 2018, 02:04:07 pm »
I tested you program and it works properly, inside and outside the FPC IDE. What compiler and IDE version are you using?

Anyway, this might be a Windows 10 issue (using Linux here).
Are you interested in game programming? Join the Pascal Game Development community!
Also visit the Game Development Portal

jamie

  • Hero Member
  • *****
  • Posts: 6090
Re: Strange problem with 'enter' key
« Reply #2 on: February 24, 2018, 04:04:41 pm »
looks like the line ending is not correct for the console?

CR = Return to the start of the line..
LF  = Line Feed.

So in this case, only CR is being issued at the end  Hmm..

not sure if this is a OS setup issue or what?

Can you please show the top of your source? are you using the CRT unit by any chance ?
« Last Edit: February 24, 2018, 04:07:19 pm by jamie »
The only true wisdom is knowing you know nothing

 

TinyPortal © 2005-2018