Noobie Question

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

  • : 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.
  • 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.

Howdy, Stranger!

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

Categories