Is there a way to get code to disappear and function

Please discuss general Delphi programming topics here.

Is there a way to get code to disappear and function

Postby Christine123 » August 9th, 2007, 4:57 am

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
Christine123
Junior Member
Junior Member
 
Posts: 25
Joined: May 28th, 2007, 10:28 pm

Postby Johnny_Bit » August 9th, 2007, 12:35 pm

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.
Thou shalt write the code, not connect the bricks.
Johnny_Bit
VIP Member
VIP Member
 
Posts: 455
Joined: June 15th, 2003, 9:56 am

Postby Christine123 » August 9th, 2007, 11:38 pm

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;
Christine123
Junior Member
Junior Member
 
Posts: 25
Joined: May 28th, 2007, 10:28 pm

Postby HPW » August 10th, 2007, 5:16 am

You mean code-folding.
Some advanced editors support this.
I am not sure if one of the later delphi edition does it.
Hans-Peter
HPW
Moderator
Moderator
 
Posts: 236
Joined: February 25th, 2006, 10:19 am
Location: Germany

Postby Christine123 » August 11th, 2007, 12:30 am

so probably delphi 2006 professional won't have it
Christine123
Junior Member
Junior Member
 
Posts: 25
Joined: May 28th, 2007, 10:28 pm


Return to Delphi Programming

Who is online

Users browsing this forum: No registered users and 2 guests

cron