Returns four conditions of integers.

// 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

Use of stream in Delphi (2) Use of tfilestream (file stream) for read and write

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

Detailed description of the xmldocument class in Delphi (2)-notes

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

Detailed description of the xmldocument class in Delphi (8)-add and delete nodes

Unit unit1; interfaceuses windows, messages, sysutils, variants, classes, graphics, controls, forms, dialogs, xmldom, xmlintf, msxmldom, xmldoc, stdctrls; Type tform1 = Class (tform) xmldocument1: txmldocument; identifier: tmemo; button1: tbutton;

Detailed description of the xmldocument class in Delphi (10)-determining node types: Supporting nodes, leaf nodes, text nodes, and empty nodes

Unit unit1; interfaceuses windows, messages, sysutils, variants, classes, graphics, controls, forms, dialogs, xmldom, xmlintf, msxmldom, xmldoc, stdctrls; Type tform1 = Class (tform) xmldocument1: txmldocument; button1: tbutton; button2: tbutton;

Detailed description of the xmldocument class in Delphi (11)-a redundant attribute: Nodes

Unit unit1; interfaceuses windows, messages, sysutils, variants, classes, graphics, controls, forms, dialogs, xmldom, xmlintf, msxmldom, xmldoc, stdctrls; Type tform1 = Class (tform) xmldocument1: txmldocument; button1: tbutton; Procedure formcreate

Xmldocument class in Delphi (16)-First and last nodes in the node list

Unit unit1; interfaceuses windows, messages, sysutils, variants, classes, graphics, controls, forms, dialogs, xmldom, xmlintf, msxmldom, xmldoc, stdctrls; Type tform1 = Class (tform) xmldocument1: txmldocument; button1: tbutton; Procedure formcreate

Detailed description of the xmldocument class in Delphi (20)-dynamic creation of xmldocument objects

Unit unit1; interfaceuses windows, messages, sysutils, variants, classes, graphics, controls, forms, dialogs, stdctrls, xmldom, xmlintf, msxmldom, xmldoc; Type tform1 = Class (tform) button1: tbutton; button2: tbutton; button3: tbutton; Procedure

Learning structure [Record] type (3)-Relationship between Structures

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

Learning structure [Record] type (8)-structure nesting

Unit unit1; interfaceuses windows, messages, sysutils, variants, classes, graphics, controls, forms, dialogs, stdctrls; Type tform1 = Class (tform) button1: tbutton; button2: tbutton; button3: tbutton; Procedure button1click (Sender: tobject);

Understanding Delphi classes (10)-in-depth methods [15]-calling functions of other units

// 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):

Understanding Delphi classes (10)-in-depth methods [18]-methods declared in the interface area are equivalent to statements in advance

// 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

Understanding Delphi classes (10)-in-depth method [23]-heavy load

{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

Understanding Delphi classes (11)-in-depth methods in classes [2]-covering and redefinition

// 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}

Understanding Delphi classes (7)-Understanding class Polymorphism

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

Detailed description of the xmldocument class in Delphi (3)-reading XML files

Unit unit1; interfaceuses classes, controls, forms, stdctrls, xmldoc, xmldom, xmlintf, msxmldom; Type tform1 = Class (tform) xmldocument1: txmldocument; memo1: tmemo; button1: tbutton; button2: tbutton; button3: tbutton; button4: tbutton; Procedure

Use of stream in Delphi (4) traverse and read all data in the stream

Unit unit1; interfaceuses windows, messages, sysutils, variants, classes, graphics, controls, forms, dialogs, stdctrls; Type tform1 = Class (tform) memo1: tmemo; memo2: tmemo; {two memo needs to be added for display} button1: tbutton; Procedure

Abstracterrorproc-pointer to abstract error handling

Unit unit1; interfaceuses windows, messages, sysutils, variants, classes, graphics, controls, forms, dialogs, stdctrls; type {parent class} tbase = Class procedure proc; virtual; abstract; {abstract method} end; {subclass} tchild = Class (tbase)

Detailed description of the xmldocument class in Delphi (1)-content awaiting study

// Function addchild (const tagname: domstring): ixmlnode; overload; addchild (const tagname, namespaceuri: domstring): ixmlnode; overload; createelement (const tagordata, namespaceuri: domstring ): ixmlnode; createnode (const nameordata: domstring;

Math mathematical functions

// 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

Total Pages: 64722 1 .... 54256 54257 54258 54259 54260 .... 64722 Go to: GO

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.