[fpc-pascal] Converting old pascal written for Pascal/MT+ compiler
    Jacob Kroon 
    jacob.kroon at gmail.com
       
    Tue Apr  4 09:47:07 CEST 2023
    
    
  
Hi Michael,
On 4/4/23 09:05, Michael Van Canneyt wrote:
[cut]
>>
>> Do I have any other option besides changing from "var" to "const" 
>> everywhere, and provide initial values in all declarations ?
> 
> Make them actually global variables.
> 
> procedure X;
> 
> Var
>   y : integer;
> 
> begin
> // Use y
> end;
> 
> becomes
> 
> var x__y : integer;
> 
> procedure x;
> 
> begin
>    // use x__y end;
> 
> I did this operation manually for some programs that I had to update.
> Maybe perl can help.
> 
Ok, makes sense. I'll see if putting them in "const" sections makes more 
sense, otherwise I guess this is the route I'll have to take.
Regards,
Jacob
    
    
More information about the fpc-pascal
mailing list