Recent

Author Topic: problem with programming  (Read 3354 times)

Hubert Noel

  • Newbie
  • Posts: 3
problem with programming
« on: September 28, 2014, 03:11:20 pm »
As i'm learning programming with pascal code so i downloaded lazarus to be able to test my program codes,but after inserting data where i need to have an output windows, it closes thus i'm no able to read the outputs. i think it is an exit code which closes the window.

Can someone help me please
« Last Edit: September 28, 2014, 03:13:09 pm by Hubert Noel »

Blaazen

  • Hero Member
  • *****
  • Posts: 3237
  • POKE 54296,15
    • Eye-Candy Controls
Re: problem with programming
« Reply #1 on: September 28, 2014, 03:20:36 pm »
Please tell us your Lazarus version, FPC version, your OS and from where you downloaded Lazarus and FPC.
Lazarus 2.3.0 (rev main-2_3-2863...) FPC 3.3.1 x86_64-linux-qt Chakra, Qt 4.8.7/5.13.2, Plasma 5.17.3
Lazarus 1.8.2 r57369 FPC 3.0.4 i386-win32-win32/win64 Wine 3.21

Try Eye-Candy Controls: https://sourceforge.net/projects/eccontrols/files/

Mike.Cornflake

  • Hero Member
  • *****
  • Posts: 1260
Re: problem with programming
« Reply #2 on: September 28, 2014, 07:15:30 pm »
As i'm learning programming with pascal code so i downloaded lazarus to be able to test my program codes,but after inserting data where i need to have an output windows, it closes thus i'm no able to read the outputs. i think it is an exit code which closes the window.

Can someone help me please

In addition to what @Blaazen has asked....

Wildly guessing you're writing a console app.   Still a ReadLn; in your code.  That should block exit until the user presses return...
Lazarus Trunk/FPC Trunk on Windows [7, 10]
  Have you tried searching this forum or the wiki?:   http://wiki.lazarus.freepascal.org/Alternative_Main_Page
  BOOKS! (Free and otherwise): http://wiki.lazarus.freepascal.org/Pascal_and_Lazarus_Books_and_Magazines

howardpc

  • Hero Member
  • *****
  • Posts: 4144
Re: problem with programming
« Reply #3 on: September 28, 2014, 08:37:31 pm »
You're perhaps developing console programs on Windows?
If so, add
Code: [Select]
{$apptype console}
as one of the first lines in your program (it is not critical exactly where it comes).
And include
Code: [Select]
Readln;
end.
as the last instruction before the final program end.

Hubert Noel

  • Newbie
  • Posts: 3
Re: problem with programming
« Reply #4 on: October 01, 2014, 03:14:23 pm »
Thank you for your help i will try it.

Hubert Noel

  • Newbie
  • Posts: 3
Re: problem with programming
« Reply #5 on: October 14, 2014, 06:12:14 pm »
the "readln;"  worked for some time but the problem returned back!!! is it me the problem?
Please help
Thank you

howardpc

  • Hero Member
  • *****
  • Posts: 4144
Re: problem with programming
« Reply #6 on: October 14, 2014, 06:27:42 pm »
There is a new Lazarus release.
Try uninstalling your present version and install the newest (1.2.6) version.
If you still have problems, post the troublesome code, otherwise we're just guessing what might be wrong.

BitBangerUSA

  • Full Member
  • ***
  • Posts: 183
Re: problem with programming
« Reply #7 on: October 14, 2014, 06:33:07 pm »
i will guess that you are having a problem with understanding how programs are structured.
you should either post your code for assistance or study other peoples work by reading various postings in this Lazarus forum.
or both.

also, note that Blazzen suggests providing your Lazarus and computer information.
Lazarus Ver 2.2.6 FPC Ver 3.2.2
Windows 10 Pro 64-bit

 

TinyPortal © 2005-2018