Page 1 of 1

Is there a way to get code to disappear and function

PostPosted: August 9th, 2007, 4:57 am
by Christine123
I have all this code that I really can't put in a function and has to be in the main. Is there a way I can clear all this out so that it will performs, but I don't see it?

Thank you,
Christine

PostPosted: August 9th, 2007, 12:35 pm
by Johnny_Bit
Everything is possible, you just have to get the way... besides we don't know what we're dealing with, so first please, enlighten us.

PostPosted: August 9th, 2007, 11:38 pm
by Christine123
thank you for the reply johnny. Here's what I mean.


This is an example of the code I have
Code: Select all
begin
  x := x + 1;
 y := y + 2;
 z := sqr(x + y);

writeln(z);
end;


This is what I want my code to look like. Where the [ ]'s are just an indication that some code is there. I know in a unit you can minimize the interface section, where one way you see a whole bunch of code and the other way you just see a small box. When you click inside the box then you can see the code contained within. I hope that is clear

Code: Select all
begin
[    ]
writeln(z);
end;

PostPosted: August 10th, 2007, 5:16 am
by HPW
You mean code-folding.
Some advanced editors support this.
I am not sure if one of the later delphi edition does it.

PostPosted: August 11th, 2007, 12:30 am
by Christine123
so probably delphi 2006 professional won't have it