// Return the four conditions of the integer const A = 1.8; B =-1.8; begin {returns the smallest integer with a large ratio:} showmessage (inttostr (Ceil (1.8) + ', '+ inttostr (Ceil (-1.8); {return: 2,-1} {return the largest integer with a small
Tstream is an abstract base class and cannot directly generate objects. In a specific application, it mainly uses its child classes:
Tfilestream: file stream
Tstringstream: String stream
Tmemorystream: memory stream
Tresourcestream: resource file
1. txmldocument is applicable to operations in memory and creation of new xml2. A txmldocument is actually a node set. 3. Each node includes the name, text content, attribute set, and subnode set. 4. You can location or name: Access Node 5. Each
Type trec1 = Record Name: String [12]; age: word; end; trec2 = Record Name: String [12]; age: word; end; var RecA, recb: trec1; recx, recy: trec2; Procedure tform1.button1click (Sender: tobject); begin {assign a value to RecA} RecA. name: = 'zhang
// Point 15: Call a function of another unit // The unit containing the function: Unit unit2; interfacefunction myfun (X, Y: integer): integer; {The function must be declared in the interface area} implementationfunction myfun (X, Y: integer):
// Point 18: if the function is defined in the interface area, you do not need to use forward to declare unit unit1; interfaceuses windows, messages, sysutils, variants, classes, graphics, controls, forms, dialogs, stdctrls; Type tform1 = Class
{The following functions have duplicate names, but different parameters. In this case, the overload indicator must be added. During the call, the type and number of parameters are used to determine which one to call. This is an overload .} function
// The standard coverage is such that tbass = Class procedure proc; virtual; {or use dynamic} end; tchild = Class (tbass) Procedure proc; override; end;
// The following situations are redefined. For example 3-5, the compilation prompt {Example 1}
What is polymorphism? In my understanding, the same method has different implementations in different objects.
Unit unit1; interfaceuses windows, messages, sysutils, variants, classes, graphics, controls, forms, dialogs, stdctrls; Type tform1
// Division and remainder: divmodconst A = 11; B = 3; var X, Y: word; begin showmessage (inttostr (a div B )); {divisible 3} showmessage (inttostr (a mod B); {remainder 2} divmod (a, B, x, y); showmessage (inttostr (x )); {3} showmessage (inttostr
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service