Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

Noobie Question

OlmoOlmo Posts: 1Member
Hi, i know this is a dumbass question, but here goes anyway...

I started looking for a tutorial, and found http://sheepdogsoftware.co.uk/plt1a.htm, it looks pretty good. It says the best compiler is Pascalite, so i downloaded it, and everything worked fine.

But when i try to "simulate" a program i've made, i can't:

I write the program, in this case, a very simple one (it's my first one :-P):
---
program first;
begin
write(lcd,'Hi');
end.
---
Then, i saved it and went to TOOLS -> SIMULATE PROGRAM, so a little screen shows up, with lots of switches... my code is in the background. To start the program running, i have to click on a little green triangle which is in the Code Window but, when i try and click it, the "Simulator" window (with all the switches) minimizes or something so it starts the program but i can't see what it does!

Can anyone help me??

Thannks in advnace! :D

Comments

  • zibadianzibadian Posts: 6,349Member
    : Hi, i know this is a dumbass question, but here goes anyway...
    :
    : I started looking for a tutorial, and found http://sheepdogsoftware.co.uk/plt1a.htm, it looks pretty good. It says the best compiler is Pascalite, so i downloaded it, and everything worked fine.
    :
    : But when i try to "simulate" a program i've made, i can't:
    :
    : I write the program, in this case, a very simple one (it's my first one :-P):
    : ---
    : program first;
    : begin
    : write(lcd,'Hi');
    : end.
    : ---
    : Then, i saved it and went to TOOLS -> SIMULATE PROGRAM, so a little screen shows up, with lots of switches... my code is in the background. To start the program running, i have to click on a little green triangle which is in the Code Window but, when i try and click it, the "Simulator" window (with all the switches) minimizes or something so it starts the program but i can't see what it does!
    :
    : Can anyone help me??
    :
    : Thannks in advnace! :D
    :
    Your program probably writes the word "Hi" in a window and immediately following that it reaches its end, so it closes the window. You can solve this by placing a "readln;" without any parameters as a last statement just before the "end.". This will let your program wait for the user to press enter.
  • viv.viv. Posts: 72Member
    why u put 'lcd' in your statement?
    [code] write('Hi'); [/code]

    then attach a [code] readln; [/code] b4 the [code] END; [/code] to force the program to wait till u press enter for it to exit.
Sign In or Register to comment.