Re: Pascal-Interpreter?

Dr Engelbert Buxbaum <[email protected]> Fri, 22 Apr 2022 07:29:13 +0200
Newsgroups alt.comp.lang.pascal
Organization private
Message-ID <[email protected]>
In article <[email protected]>, [email protected] says...
> 
> 
> I am still somewhat green with Pascal. I like it more than C, except 
> with modern Pascal you have to use assembler to write boot loaders and 
> drivers since they've abstracted all of the lowest-level stuff out. I 
> would rejoice if modern Pascal had direct memory and machine access like 
> Turbo Pascal did. Then I would just create my own operating system in 
> pure Pascal just for the practice.

As far as I understand, the problem is with the operating system, which 
for security reasons does not allow user-programs port-access like TP 
did under DOS. Only drivers running in kernel space can do that now.
> 
> I lament that FPC doesn't play with Modula-2 and Oberon. If I had more 
> time I would like to write a translation layer. Modula-2 and Oberon have 
> a lot of good design choices but lack in the graphics department. 

Modern Pascal compilers like FPC actually take a lot from Modula-2 and 
some from Oberon: Modular programming (units come from Modula, not 
Pascal), operator overloading...

Personally, for the types of programs I write, I find Oberon too limited 
(no enumeration type, arrays have to start at 0...). All easy to 
circumvent, but that makes programs less readable. For example, in 
Object Pascal I can do

TYPE Aminoacids  = (Ala, Arg, Asn, Asp, Cys, Gln, Glu, Gly, His,
                    Ile, Leu, Lys, Met, Phe, Pro, Pyl, Ser, Sec, 
                    Thr, Trp, Tyr, Val);
     ProSequence = array [1..ProMaxLength] of Aminoacids;
     ASFreq      = array [Aminoacids] of word;

Then counting the frequencies of amino acids in a sequence would be 
phrased almost in plain English!