[fpc-pascal] Array of Char

Carsten Bager carsten at beas.dk
Thu Aug 18 07:24:46 CEST 2005


We are moving from another Pascal compiler where this is  
allowed. 
---------------------- 
Type 
  txt_typ=packed array[0..1] of char; 

Const 
  txt1:txt_typ=('12'); 
-------------------------- 

Is there a way around this without having to write 
-------- 
  txt1:txt_typ=('1','2'); 
-------- 


Another thing, with the old compiler we can write 

Type 
  A_typ=array[0..3] of integer; 
Var 
 A1,A2:A_typ; 

Begin 
  If A1=A2 then 
End; 

I have never could understand when this is allowed 
A1:=A2; 

Why this is not allowed 
If A1=A2 then 

in most Pascal compilers.  

Regards Carsten 

-- 
Carsten Bager
Bøvlingbjerg El-automatik
Brørupvænget 10
7650 Bøvlingbjerg
Tlf. +4597885222 Fax +4597885434
http://www.beas.dk





More information about the fpc-pascal mailing list