I'm teacher at the Université de Nice and intend to use Pascal as a supporting language in the course of basic algorithmic (first semester, first year, introduction to computer science, about 700 students). Last year I used Java in this course, a language too difficult for beginners and I've won a small war to obtain the return of Pascal.
Congratulations. We never switched to Java, and still do Pascal in the first year (mostly using Delphi; but on our evaluation server we compile programs with FreePascal on a Linux box).
Some technicians are working to install the language on the student's PC, but I'm not a PC-user nor a true specialist in OS and I need to have a version of Pascal at home to prepare examples and problems. I own a portable PowerMac G4 running with the version 10.2.6 of MacOSX, I have imported the installer gpc-33d6.pkg from your page and runned it. Apparently, no problem. With TextEdit (I don't have any other) I've written the famous hello.pas and tried to compile it :
[hermes:~/Documents/Fac/Pascal] dominiqu% cat hello.pas program Hello (Output) ;
begin WriteLn('Hello, world !') end. [hermes:~/Documents/Fac/Pascal] dominiqu% gpc hello.pas /var/tmp//ccZQLUHj.s:56:Parameter error: expression out of range (parameter 4)
And I'm strictly unable to understand what is hapening.
- could someone gives any help ?
A similar program works fine on my PowerBook G4 (OS X 10.2.6 w/ gpc-33d6; I also have the developer tools (December 2002 version) installed).
I named it hello.p and compiled it with `gpc -o hello hello.p' and it prints 'Hello, Tom!'; otherwise exactly the same.
From the error message it appears that the assembly output of the compiler
(the *.s file) is wrong and fails to assemble (error in line 56).
What if you leave out `(Output)' in the header?
- I would need a syntactically adapted text editor, the simplest as
possible (to install and use it) because I'm not a developper and I've a very few knowledge of the Unix system (strictly speaking, I'm not a computer scientist but a teacher firstly specialized in mathematics and linguistics) : what would be the better choice ?
I use BBEdit; it does syntax highlighting for Pascal; you can also use the less expensive TextWrangler (both from Bare Bones Software); they easily let you switch between line-ending conventions (Unix, DOS, Mac):
or I use `vi' on the commandline (in a Terminal window); `vi' is part of the standard distribution under OS X.
Tom