You are not logged in.
Pages: 1
Hello,
I have installed pacman -S geany fpc and I have code:
begin
writeln('hello');
end.
>>F5
./hello: line 1: begin: command not found
./hello: line 2: syntax error near unexpected token `'hello''
./hello: line 2: ` writeln('hello');'
------------------
(program exited with code: 2)
Press return to continue
Then I have this error, and I don't know where is the problem.
Please, help me. Thank you...
Last edited by E_user (2011-10-26 18:50:36)
Offline
I haven't used Pascal for years, but I think you should put the “program” line at the beginning.
Offline
Use:
program Hello;
begin
writeln ('Hello')
end.
There's also a nice IDE for FreePascal, Lazarus. Maybe you want to try it.
Offline
If you select File -> New (with Template) -> program.pas in Geany, then add
writeln('hello');
after "begin", save it, press F8 to build and F5 to run, it should work. (Works here).
While Lazarus is great for creating GUI applications with FPC, Geany is a comfortable editor/environment.
Last edited by trontonic (2011-10-28 09:57:06)
Offline
Pages: 1