[fpc-devel] Modernising Pascal

Michael Van Canneyt michael at freepascal.org
Thu Feb 24 13:56:55 CET 2005



On Thu, 24 Feb 2005, Jamie McCracken wrote:

>
> It might be better to do this in an IDE and get it to add the try..finally 
> crap.
>
> EG if I say use the @ symbol to indicate a variable should be auto created 
> and destroyed then I could have :
>
> var st@, st2@ : tstringlist;
> begin
>  st.add('some text');
>  st2.add('some more text');
> end;
>
>
> which the IDE would translate behind the scenes to :
>
>
> var st, st2 : tstringlist;
> begin
>   st := tstringlist.create;
>   try
>     st2 :=  tstringlist.create;
>     try
>       st .add('some text');
>       st2.add('some more text');
>    finally
>      st2.free;
>    end;
>  finally
>    st.free;
>  end;
> end;
>
>
> I do need an IDE anyhow for container based GTK2/Gnome2/Glade apps so maybe I 
> ought to start writing one that implements this.

Why don't you see if you can get this implemented as an add-on in
Lazarus ? You get the rest of the IDE for free.

Michael.




More information about the fpc-devel mailing list