Results 1 to 4 of 4

Thread: Bug report.

  1. #1

    Bug report.

    Found a problem with freepascal and lua when using the crt unit. Issue occurs when creating a pascal library called from lua, or when loading a lua script through a pascal program.

    When the crt unit is loaded, the program stops responding when using io.read(), or io.input():read(...). Also when using the print function, the output is not lined up properly as expected. Issue only appears when I load the crt unit.

    Anyone else having this problem, and is there a workaround that does not involve dropping the crt unit?

  2. #2
    PGDCE Developer de_jean_7777's Avatar
    Join Date
    Nov 2006
    Location
    Bosnia and Herzegovina (Herzegovina)
    Posts
    287
    Quote Originally Posted by Dilan Rona View Post
    Anyone else having this problem, and is there a workaround that does not involve dropping the crt unit?
    Afaik, the crt unit does something funky with stdin and stdout, so I usually avoid it. Can't say I know of an alternative. What functionality do you need crt for exactly?
    Existence is pain

  3. #3
    michael from freepascal.org gave the following reply.





    > This is normal.
    > The crt unit completely disables regular input.
    > There is nothing we can do about this, that is why the crt unit is made.






    So from what I understand it interferes with the input/output handling of lua. Not just when reading input from a keyboard, but the output to the screen with print as well. and I havent tested it yet but I assume the same will hold for the file io routines as well.

    I wanted to use the functions and procedures within the crt unit as lua cannot provide them (gotoxy, clrscr, window, etc...). But looks like i will have to code my own version with the needed functions and procedures.

  4. #4
    I'm having the same issue since a week now and I reported it but it's still not working and I still have no answer.

    Appvalley TutuApp Tweakbox
    Last edited by davido; 26-01-2020 at 01:35 PM.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •