Recent

Author Topic: console in Lazarus.  (Read 5691 times)

Seenkao

  • Hero Member
  • *****
  • Posts: 546
    • New ZenGL.
console in Lazarus.
« on: January 18, 2022, 08:25:47 pm »
Linux
Lazarus 2.0.12 r64642

в консоли не работает "Enter"на цифровой клавиатуре.
google translate:
"Enter" on the numeric keypad does not work in the console.

offtop:
а в Windows консоли вообще нет. )))
eng: and in Windows there is no console at all.. )))
Rus: Стремлюсь к созданию минимальных и достаточно быстрых приложений.

Eng: I strive to create applications that are minimal and reasonably fast.
Working on ZenGL

Bart

  • Hero Member
  • *****
  • Posts: 5275
    • Bart en Mariska's Webstek
Re: console in Lazarus.
« Reply #1 on: January 18, 2022, 10:31:13 pm »
offtop:
eng: and in Windows there is no console at all.. )))

Complier Options->Config and Target-> uncheck "Win32 GUI Application".

Bart

Seenkao

  • Hero Member
  • *****
  • Posts: 546
    • New ZenGL.
Re: console in Lazarus.
« Reply #2 on: January 19, 2022, 12:32:57 am »
Complier Options->Config and Target-> uncheck "Win32 GUI Application".

Bart
Это консоль Windows. Консоли Lazarus нет. :)
Eng:
This is the Windows console. There is no Lazarus console. :)
Rus: Стремлюсь к созданию минимальных и достаточно быстрых приложений.

Eng: I strive to create applications that are minimal and reasonably fast.
Working on ZenGL

dbannon

  • Hero Member
  • *****
  • Posts: 2786
    • tomboy-ng, a rewrite of the classic Tomboy
Re: console in Lazarus.
« Reply #3 on: January 19, 2022, 04:09:34 am »
I think Seenkao means that if you type into the Lazarus "Console In/Out" in Linux then the char are not echoed back to the "console".  I have a feeling they used to be, at least the Enter key would insert a blank line that was useful to break up a series of debug messages.

Davo

Lazarus 3, Linux (and reluctantly Win10/11, OSX Monterey)
My Project - https://github.com/tomboy-notes/tomboy-ng and my github - https://github.com/davidbannon

PascalDragon

  • Hero Member
  • *****
  • Posts: 5446
  • Compiler Developer
Re: console in Lazarus.
« Reply #4 on: January 19, 2022, 09:43:36 am »
Complier Options->Config and Target-> uncheck "Win32 GUI Application".

Bart
Это консоль Windows. Консоли Lazarus нет. :)
Eng:
This is the Windows console. There is no Lazarus console. :)

This is by design. The Console window only exists in Lazarus for systems that don't start a console by themselves (e.g. all the *nix systems). Windows is not among these, because there Windows itself will start a console as long as you're using a console application.

Thaddy

  • Hero Member
  • *****
  • Posts: 14199
  • Probably until I exterminate Putin.
Re: console in Lazarus.
« Reply #5 on: January 19, 2022, 11:03:10 am »
On Windows you can also change {$apptype GUI} into {$apptype console} in the lpr file.
That runs the GUI application, but also opens a console window. This is the same as Barts setting but is more flexible e.g.:
Code: Pascal  [Select][+][-]
  1. {program project1;
  2. {$mode objfpc}{$H+} {$ifopt D+}{$apptype console}{$endif}
  3.  

I find that very useful for debugging. In the example image  the program uses a writeln() in the form.Oncreate event.
« Last Edit: January 19, 2022, 12:29:07 pm by Thaddy »
Specialize a type, not a var.

Seenkao

  • Hero Member
  • *****
  • Posts: 546
    • New ZenGL.
Re: console in Lazarus.
« Reply #6 on: January 19, 2022, 11:40:03 am »
Я не спрашивал про Windows!!!

Я пишу о проблеме Lazarus. Кнопка "Enter" на цифровой клавиатуре не работает!!!
Code: Pascal  [Select][+][-]
  1. Readln;  // "Enter" не даст результата!!!

google translate:
I didn't ask about Windows!!!

I'm writing about a Lazarus issue. The "Enter" button on the numeric keypad does not work!!!
Code: Pascal  [Select][+][-]
  1.  ReadIn; // "Enter" won't work!!!
Rus: Стремлюсь к созданию минимальных и достаточно быстрых приложений.

Eng: I strive to create applications that are minimal and reasonably fast.
Working on ZenGL

Thaddy

  • Hero Member
  • *****
  • Posts: 14199
  • Probably until I exterminate Putin.
Re: console in Lazarus.
« Reply #7 on: January 19, 2022, 12:55:25 pm »
I'm writing about a Lazarus issue. The "Enter" button on the numeric keypad does not work!!!
Code: Pascal  [Select][+][-]
  1.  ReadIn; // "Enter" won't work!!!
Well, turn the keypad on? here it works. Even with a USB keypad on a laptop that doesn't even has a keypad otherwise.
The toggle is the left most top most key on the keypad.
Specialize a type, not a var.

Seenkao

  • Hero Member
  • *****
  • Posts: 546
    • New ZenGL.
Re: console in Lazarus.
« Reply #8 on: January 19, 2022, 01:03:43 pm »
Well, turn the keypad on? here it works. Even with a USB keypad on a laptop that doesn't even has a keypad otherwise.
The toggle is the left most top most key on the keypad.
Linux
Lazarus 2.0.12 r64642
Linux!!!
Have you checked?
Rus: Стремлюсь к созданию минимальных и достаточно быстрых приложений.

Eng: I strive to create applications that are minimal and reasonably fast.
Working on ZenGL

Thaddy

  • Hero Member
  • *****
  • Posts: 14199
  • Probably until I exterminate Putin.
Re: console in Lazarus.
« Reply #9 on: January 19, 2022, 02:11:17 pm »
Linux!!!
Have you checked?
Can't you read? the subject is specific to Windows..... >:D 8-) O:-)
On Linux it has never been an issue.
Specialize a type, not a var.

Bart

  • Hero Member
  • *****
  • Posts: 5275
    • Bart en Mariska's Webstek
Re: console in Lazarus.
« Reply #10 on: January 19, 2022, 02:18:35 pm »
Can't you read? the subject is specific to Windows..... >:D 8-) O:-)

The original problem of TS (Seenkao) is that Enter key on NumPad does not work for him in the console on Linux.
The fact he did not see a console on Windows, TS himself declared as "off-topic".

De pot verwijt de ketel hier ...

Bart

Thaddy

  • Hero Member
  • *****
  • Posts: 14199
  • Probably until I exterminate Putin.
Re: console in Lazarus.
« Reply #11 on: January 19, 2022, 02:23:33 pm »
well, bart, it works here...both linux and windows. I suspect I am right.
Specialize a type, not a var.

Bart

  • Hero Member
  • *****
  • Posts: 5275
    • Bart en Mariska's Webstek
Re: console in Lazarus.
« Reply #12 on: January 19, 2022, 02:36:28 pm »
well, bart, it works here...both linux and windows. I suspect I am right.
You may be right that it works, but your remark in reply #9 was wrong and insulting.
You really should apologize to Seenkao.

Bart

Seenkao

  • Hero Member
  • *****
  • Posts: 546
    • New ZenGL.
Re: console in Lazarus.
« Reply #13 on: January 19, 2022, 02:45:28 pm »
well, bart, it works here...both linux and windows. I suspect I am right.
Вопрос не предназначался по Windows!!! Это был offtop!
Читайте пожалуйста мой первый пост!!!
google translate:
The question was not meant for Windows!!! It was offtop!
Please read my first post!!!
Rus: Стремлюсь к созданию минимальных и достаточно быстрых приложений.

Eng: I strive to create applications that are minimal and reasonably fast.
Working on ZenGL

Thaddy

  • Hero Member
  • *****
  • Posts: 14199
  • Probably until I exterminate Putin.
Re: console in Lazarus.
« Reply #14 on: January 19, 2022, 05:02:40 pm »
Ok, apologies.
BUT: I was merely expanding on Sarah's remark.
Specialize a type, not a var.

 

TinyPortal © 2005-2018