IT SOLUTIONS
Your full service technology partner! 
-Collapse +Expand
Prism
Search Prism Group:

Advanced
-Collapse +Expand Prism To/From
To/FromCODEGuides
-Collapse +Expand Prism Study Test
PRESTWOODCERTIFIED
-Collapse +Expand Prism Store
PRESTWOODSTORE
   ► KBProgrammingDelphi PrismLanguage Basics   Print This     

Prism KB: Language Basics Topic



16 Articles Found in the Language Basics Topic 

  KB Article    

Mike Prestwood
1. Delphi Prism Case Sensitivity (No)

Prism is generally not case sensitive. Commands and variable names are not case sensitive.

Note: Prism (and Delphi for .Net) do not automatically match your typed case with the defined case as C# and VB.Net do within the Visual Studio Shell.

12 years ago, and updated 11 years ago

Code
Nothing New Since Your Last Visit  
7408
Hits

Delphi Prism

Mike Prestwood
2. Delphi Prism Code Blocks (begin..end)

Same as in Delphi for Win32 but Prism also supports inline variable declaration.

12 years ago, and updated 11 years ago
(2 Comments , last by mprestwood )

Code

KB Post
Nothing New Since Your Last Visit
12909
Hits

Delphi Prism

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

Same as Delphi.

11 years ago

Code
Nothing New Since Your Last Visit
8377
Hits

Delphi Prism

Mike Prestwood
4. Delphi Prism Custom Routines (method, procedure, function)

In Prism, everything is within a class (just like with C#, VB.Net, and Java). So you create class methods using the method keyword. Alternatively, you can use procedure or function if you want the compiler to enforce returning or not returning a value.

12 years ago, and updated 11 years ago

Code

KB Post
Nothing New Since Your Last Visit
19845
Hits

Delphi Prism

Mike Prestwood
5. Delphi Prism End of Statement (;)

Object Pascal uses a semicolon ";" as an end of statement specifier and you can put multiple statements on a single line of code and put a single statement on two or more code lines if you wish.

12 years ago, and updated 11 years ago

Code
Nothing New Since Your Last Visit  
8512
Hits

Delphi Prism

Mike Prestwood
6. Delphi Prism File Extensions

Common or primary file extensions used (not a complete list, just the basics). Delphi Prism common source code file extensions include:

  • .SLN - Solution File.
  • .Oxygene - Project File. Contains project specific information but this is not the Delphi-like project file Delphi developers are used to. This is the VS.Net project file.
  • Program.pas - This is the Delphi-like .dpr project-equivalent file and contains the Main method.
  • .pas - Delphi Prism source file (same extension as Delphi for Win32).
  • .Designer.pas - Prism form file (a text resource file).
12 years ago, and updated 11 years ago

Code
Nothing New Since Your Last Visit
8177
Hits

Delphi Prism

Mike Prestwood
7. Delphi Prism Literals (quote or apostrophe)

General Info: Programming Literals

A value directly written into the source code of a computer program (as opposed to an identifier like a variable or constant). Literals cannot be changed. Common types of literals include string literals, floating point literals, integer literals, and hexidemal literals. Literal strings are usually either quoted (") or use an apostrophe (') which is often referred to as a single quote. Sometimes quotes are inaccurately referred to as double quotes.

Languages Focus: Literals

In addition to understanding whether to use a quote or apostrophe for string literals, you also want to know how to specify and work with other types of literals including floating point literals. Some compilers allow leading and trailing decimals (.1 + .1), while some require a leading or trailing 0 as in (0.1 + 0.1). Also, because floating point literals are difficult for compilers to represent accurately, you need to understand how the compiler handles them and how to use rounding and trimming commands correctly for the nature of the project your are coding.

Delphi Prism Literals

In Prism, you use either quotes or apostrophes for string literals.

Different than Delphi, you can start floating point literals with a decimal or an integer. For example, to specify a fractional floating point literal between 1 and -1, you can preceed the decimal with a 0 or not.

x := .1 + .1; //Does work.
x := 0.1 + 0.1; //Does work.
12 years ago, and updated 11 years ago

Code
Nothing New Since Your Last Visit  
8829
Hits

Delphi Prism

Mike Prestwood
8. Delphi Prism Logical Operators

Prism logical operators:

and and, as in this and that
or or, as in this or that
not Not, as in Not This
xor either or, as in this or that but not both

11 years ago

Code
Nothing New Since Your Last Visit  
8602
Hits

Delphi Prism

Mike Prestwood
9. Delphi Prism Overview and History

Language Overview: Prism is a type safe language and a fully OOP language (no global functions or variables except for a very special __Global class). You code using a fully OOP approach (everything is in a class) but you have the additional benefit of a hybrid language using a special __Global class. Prism targets the .Net CLR and Mono. Based on Borland's original work with Delphi.Net and the continued by RemObjects as Oxygene, and now co-developed by CodeGear and RemObjects.

Target Platforms: Delphi Prism is most suitable for creating any type of application that runs on the .Net platform. This includes desktop business application using WinForms and websites using WebForms.

12 years ago, and updated 11 years ago

Code
Nothing New Since Your Last Visit
6607
Hits

Delphi Prism

Mike Prestwood
10. Delphi Prism Parameters (var, const, out)

Prism allows parameters of the same type to be listed together, separated by commas, and followed with a single data type (more params of different data types can follow, after a semi-colon). The default for parameters is by value. For by reference, add var in front of the parameter. Prism also offers constant parameters where you add const in front of the parameter. A constant parameter is like a local constant or read-only parameter the compiler can optimize.

12 years ago, and updated 11 years ago

Code
Nothing New Since Your Last Visit  
11677
Hits

Delphi Prism

Mike Prestwood
11. Delphi Prism Report Tools Overview

For WebForm applications the client target is the browser (a document interfaced GUI), a common solution is to simply output an HTML formatted page with black text and a white background (not much control but it does work for some situations). For WinForm applications Rave Reports and Crystal Reports are very popular with Delphi Prism and Delphi for .Net developers.

12 years ago, and updated 12 years ago

Code
Nothing New Since Your Last Visit
7362
Hits

Delphi Prism

Mike Prestwood
12. Delphi Prism String Concatenation (+)

Unlike Delphi, Prism performs implicit casting. To concatenate two strings, a string to an integer, or a string to a floating point number, use the + operator. For example, to convert a floating point number to a string just concatenate an empty string to the number as in "" + 3.2.

11 years ago, and updated 11 years ago
(3 Comments , last by mtiede )

Code

KB Post
Nothing New Since Your Last Visit
14438
Hits

Delphi Prism

Mike Prestwood
13. Delphi Prism Syntax compared with Win32 Delphi http://prismwiki.codegear.com/en/Delphi_Prism_Syntax_compared_with_Win32_Delphi
12 years ago

Link
Nothing New Since Your Last Visit
5090
Hits

Delphi Prism

Mike Prestwood
14. Delphi Prism Unary Operators

The Prism unary operators are:

+
-
Not

11 years ago, and updated 11 years ago

Code

KB Post
Nothing New Since Your Last Visit
12627
Hits

Delphi Prism

Mike Prestwood
15. The Delphi Prism WIKI http://prismwiki.codegear.com/en/Main_Page
12 years ago

Link
Nothing New Since Your Last Visit
5752
Hits

Delphi Prism

Mike Prestwood
16. Win32 Delphi vs. Delphi Prism http://prismwiki.codegear.com/en/Win32_Delphi_vs._Delphi_Prism
12 years ago

Link
Nothing New Since Your Last Visit
4688
Hits

Delphi Prism

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 Delphi Prism 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...
  Delphi Prism Message Board
Go ahead!   Use Us! Call: 916-726-5675  Or visit our new sales site: 
www.prestwood.com


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