IT SOLUTIONS
Your full service technology partner! 
-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
(2 Comments , last by kevin.b3 )

Article
Nothing New Since Your Last Visit
9208
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
7245
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
15415
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
27958
Hits

Pascal and Delphi Coding

William Pantoja
5. COM Collections

Correctly implementing COM collections.

12 years ago

Article
Nothing New Since Your Last Visit
8288
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
5875
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
(5 Comments , last by Angela.L2 )

Code
Nothing New Since Your Last Visit
16251
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
12339
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
9866
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  
16526
Hits

Pascal and Delphi Coding

Mike Prestwood
11. Delphi LeftStr

Delphi LeftStr

12 years ago

Code
Nothing New Since Your Last Visit
10614
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
22853
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
9934
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
11950
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  
10602
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
11808
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
6837
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
15144
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
12072
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
20263
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
(2 Comments , last by mprestwood )

KB Post
Nothing New Since Your Last Visit
13031
Hits

Pascal and Delphi Coding

Mike Prestwood
23. Using SetWindowLong in Delphi Use SetWindowLong to hide your application.
18 years ago

KB Post
Nothing New Since Your Last Visit
14880
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
8493
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
7650
Hits

Pascal and Delphi Coding

Icon Legend:
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
Sales Website: www.prestwood.com Or visit our legacy sales site: 
legacy.prestwood.com


©1995-2020 Prestwood IT Solutions.   [Security & Privacy]