I.T. Discussion Community!
-Collapse +Expand
Delphi
Search Delphi Group:

Advanced
-Collapse +Expand Delphi To/From
To/FromCODEGuides
-Collapse +Expand Delphi Store
PRESTWOODSTORE
   ► KBProgrammingDelphi for W...Language Det...   Print This     

Delphi KB: Language Details Topic



26 Articles Found in the Language Details Topic 

  KB Article    

Mike Prestwood
1. A New Look At Delphi Exceptions

When you want the exception to be the rule. A technique for handling exceptions in Borland Delphi's Object Pascal.

18 years ago, and updated 18 years ago
(6 Comments , last by Kevin.P )

Article
Nothing New Since Your Last Visit
9282
Hits

Pascal and Delphi Coding

Mike Prestwood
2. Arrays Arrays in Object Pascal.
17 years ago, and updated 14 years ago

KB Post
Nothing New Since Your Last Visit
7271
Hits

Pascal and Delphi Coding

Mike Prestwood
3. Associative Arrays in Delphi/Object Pascal

Although Object Pascal doesn't have a native associative array, many developers just use a TStringList. Others have implemented a true associative array in Object Pascal. Search the Internet for TStringHash and THashedStringList classes for examples.

12 years ago, and updated 11 years ago

Tip
Nothing New Since Your Last Visit
15470
Hits

Pascal and Delphi Coding

Mike Prestwood
4. Associative Arrays in Delphi/Object Pascal (Use TStringList)

TStringList Example
Object Pascal doesn't have a native associative array, but you can use a TStringList the same way. (Alternatively, search the Internet for TStringHash and THashedStringList classes for implementations of a true associative array).

12 years ago, and updated 12 years ago
(11 Comments , last by peter.j2 )

Code
Nothing New Since Your Last Visit
28077
Hits

Pascal and Delphi Coding

William Pantoja
5. COM Collections

Correctly implementing COM collections.

12 years ago

Article
Nothing New Since Your Last Visit
8304
Hits

Pascal and Delphi Coding

Mike Prestwood
6. Creating Arrays in Object Pascal This lesson shows you how to create and use several different types of arrays in Object Pascal.
18 years ago, and updated 17 years ago

KB Post
Nothing New Since Your Last Visit
5904
Hits

Pascal and Delphi Coding

Mike Prestwood
7. Delphi Associative Array (TStringList Assoc Array)

Object Pascal doesn't have a native associative array, but you can use a TStringList the same way. (Alternatively, search the Internet for TStringHash and THashedStringList classes for implementations of a true associative array).

12 years ago, and updated 11 years ago
(6 Comments , last by Whitney.E )

Code
Nothing New Since Your Last Visit
16358
Hits

Pascal and Delphi Coding

Mike Prestwood
8. Delphi Comparison Operators (=, <>)

Common comparison operators:

= equal
<> not equal
< less than
> greater than
<= less than or equal
>= greater than or equal

11 years ago, and updated 11 years ago

Code

KB Post
Nothing New Since Your Last Visit
12500
Hits

Pascal and Delphi Coding

Mike Prestwood
9. Delphi Custom Routines (procedure, function)

Delphi is a hybrid language so you can create either class methods (functions and procedures) or you can create global functions and procedures. When a function or procedure is part of a class, it is a class method.

[function/procedure] RoutineName : ReturnType;

As with C++, your custom routine must come before it's first usage or you have to prototype it in the Interface section.

Note: Contrast Delphi with Delphi Prism which is an OOP language (everything is within a class). Both Delphi and Delphi Prism are based on Object Pascal but implement OOP features differently and have some syntax differences too.

12 years ago, and updated 12 years ago

Code
Nothing New Since Your Last Visit
9916
Hits

Pascal and Delphi Coding

Mike Prestwood
10. Delphi Inlining (Inline)

Delphi introduced developer defined function and procedure inlining with Delphi 2005. Use the inline keyword to tell the compiler to inline a routine. Since Delphi will always inline the routine, make sure you test for speed because inlining a routine can lead to slower code under some circumstances.

11 years ago
(3 Comments , last by Lucinda.H )

Code
Nothing New Since Your Last Visit  
16612
Hits

Pascal and Delphi Coding

Mike Prestwood
11. Delphi LeftStr

Delphi LeftStr

12 years ago

Code
Nothing New Since Your Last Visit
10670
Hits

Pascal and Delphi Coding

Mike Prestwood
12. Delphi Overloading (overload)

Object Pascal

  • Operator - Yes. But not Pascal.
  • Method - Yes.  
12 years ago, and updated 11 years ago

Code

Article
Nothing New Since Your Last Visit
22972
Hits

Pascal and Delphi Coding

Mike Prestwood
13. Delphi Pointers

Although pointer data types in Delphi coding are less important and not required for most general coding, Delphi fully supports developer defined pointers. Use a carrot (^) to declare a pointer data type. Use the @ operator or Addr function to return the current address of a variable.

11 years ago

Code
Nothing New Since Your Last Visit
9983
Hits

Pascal and Delphi Coding

Mike Prestwood
14. Delphi Self Keyword (Self)

Within the implementation of a method, the identifier Self references the object in which the method is called. The Self variable is an implicit parameter for each object method.
A method can use this variable to refer to its owning class.

11 years ago

Code
Nothing New Since Your Last Visit
12015
Hits

Pascal and Delphi Coding

Mike Prestwood
15. Example: Using Sets in Borland Delphi

Simple example of using sets in Delphi. Sets are similar to arrays and are convenient to use with 'in'.

17 years ago, and updated 12 years ago

Code
Nothing New Since Your Last Visit  
10627
Hits

Pascal and Delphi Coding

Mike Prestwood
16. Pascal and PChar Strings Using Pascal and PChar strings in Delphi.
17 years ago, and updated 14 years ago
(1 Comments )

KB Post
Nothing New Since Your Last Visit
11842
Hits

Pascal and Delphi Coding

Mike Prestwood
17. Records Using record data types in Delphi.
17 years ago, and updated 14 years ago

KB Post
Nothing New Since Your Last Visit
6856
Hits

Pascal and Delphi Coding

Mike Prestwood
18. Using Case Statements in Object PASCAL Using case statements in Delphi.
17 years ago, and updated 9 years ago
(1 Comments )

KB Post
Nothing New Since Your Last Visit
15195
Hits

Pascal and Delphi Coding

Mike Prestwood
20. Using MessageBox MessageBox is similar to ShowMessage but gives you more control over how it displays. This one is a favorite of developers because it is a Windows API function wrapped in a Delphi method. This is important because many Windows development languages support the MessageBox function.
18 years ago
(7 Comments , last by Edna.B )

KB Post
Nothing New Since Your Last Visit
12115
Hits

Pascal and Delphi Coding

Mike Prestwood
21. Using Null Terminated and PChar Strings in Delphi How to use Delphi's two varieties of string variables: Pascal strings and PChar strings.
17 years ago, and updated 12 years ago
(4 Comments , last by Emerald.Y )

KB Post
Nothing New Since Your Last Visit
20329
Hits

Pascal and Delphi Coding

Mike Prestwood
22. Using Record Types In Delphi How to use records in Delphi.
17 years ago, and updated 12 years ago
(3 Comments , last by Heidi.M2 )

KB Post
Nothing New Since Your Last Visit
13117
Hits

Pascal and Delphi Coding

Mike Prestwood
23. Using SetWindowLong in Delphi Use SetWindowLong to hide your application.
18 years ago
(1 Comments , last by Keane.L )

KB Post
Nothing New Since Your Last Visit
14976
Hits

Pascal and Delphi Coding

Mike Prestwood
24. Using ShowMessage ShowMessage displays a simple dialog box with the text you provide it. It is one of the most used ways of displaying information.
18 years ago
(2 Comments , last by RubyE.McCa.R )

KB Post
Nothing New Since Your Last Visit
8510
Hits

Pascal and Delphi Coding

Mike Prestwood
25. Using the ^ Operand Simple example of using the carrot operand.
17 years ago

KB Post
Nothing New Since Your Last Visit
7695
Hits

Pascal and Delphi Coding

Icon Legend:
Recent or not:
- Recent activity (within last two weeks).
- No activity last two weeks.
 Since your last logged visit:
- New to you or updated since your last visit (sign in now to activate).
- NOT new to you since your last visit (sign in now to activate).

New Pascal and Delphi Coding Knowledge Base Post...

Share your knowledge with the WORLD! In addition to adding comments to existing posts, you can post knowledge you've acquired. We welcome full articles (intro with screen shots), general posts (shorter), and tidbits (tips, FAQs, definitions, etc.).

Post New...

Tidbit Post: Short Flashcard FAQ Definition Quick Tip Code Snippet
Longer Post: Full Article General Post File Link Error News
Other: Blog Topic
Or, if YOU have a question...
  Pascal and Delphi Coding Message Board

Follow PrestwoodBoards on: 


©1995-2020 PrestwoodBoards  [Security & Privacy]
Professional IT Services: Coding | Websites | Computer Tech