Difference between revisions of "TemplateProp"
Jump to navigation
Jump to search
(3 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
+ | [[Main_Page | Main page]] -> [[ICS_Components_Reference | ICS component reference]] -> [[TemplateProp | Edit new property]] | ||
+ | |||
== Definition == | == Definition == | ||
Line 7: | Line 9: | ||
== Description == | == Description == | ||
− | Name takes a string as argument then do nothing with it and then it returns the same string. Very | + | Name takes a string as argument then do nothing with it and then it returns the same string. Very useful to keep the CPU busy. |
+ | |||
+ | == Delphi Example == | ||
+ | |||
+ | <syntaxhighlight lang="delphi"> | ||
+ | for n := 1 to 10 do | ||
+ | BusyString := BusyString + Coffee.Name(BusyString); | ||
+ | </syntaxhighlight> | ||
− | == Example == | + | == C++ Example == |
− | + | <syntaxhighlight lang="cpp"> | |
− | + | for (int n = 0; n < 10; n++) { | |
+ | BusyString += Coffee->Name(BusyString); | ||
+ | } | ||
+ | </syntaxhighlight> | ||
== Best practices == | == Best practices == | ||
− | The use of this method is | + | The use of this method is discouraged. |
== How to == | == How to == | ||
There are a lot more interesting things to keep the CPU busy. | There are a lot more interesting things to keep the CPU busy. |
Latest revision as of 16:07, 19 September 2010
Main page -> ICS component reference -> Edit new property
Definition
function TCoffee.Name(const Parameter: string): string;
Inherited from TCustomCoffee.Name
Description
Name takes a string as argument then do nothing with it and then it returns the same string. Very useful to keep the CPU busy.
Delphi Example
<syntaxhighlight lang="delphi"> for n := 1 to 10 do
BusyString := BusyString + Coffee.Name(BusyString);
</syntaxhighlight>
C++ Example
<syntaxhighlight lang="cpp"> for (int n = 0; n < 10; n++) {
BusyString += Coffee->Name(BusyString); }
</syntaxhighlight>
Best practices
The use of this method is discouraged.
How to
There are a lot more interesting things to keep the CPU busy.