I.T. Discussion Community!
-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

Prestwood eMagazine

November Edition
Subscribe now! It's Free!
Enter your email:

   ► KB ►► ProgrammingDelphi Prism   Print This    All Groups  

Delphi Prism Latest KB Comments

Ordered newest to oldest.

To view comments to your KB Articles, go to your My Knowledge Base page. To view user contributions to your blogs, go to your My Blog page.

Showing first 10. Sign in to see more.

Read +Add Comment
Shawn: Great approach! Very similar to coding for Win32/Win64 in Delphi and other such code base compiler if defs. Mike
Posted 7 years ago
Regarding...
Share Code with Delphi and Prism
Can I share code between a Delphi and a Dephi Prism project? I want to have a single source Win32 and .Net application.
Read +Add Comment
{Too Long!}
Posted 7 years ago
Regarding...
Share Code with Delphi and Prism
Can I share code between a Delphi and a Dephi Prism project? I want to have a single source Win32 and .Net application.
Read +Add Comment
{Too Long!}
Posted 7 years ago
Regarding...
VCL.Net in Delphi Prism
I'm a big fan of VCL.Net. Is VCL.Net a part of Delphi Prism?
Read +Add Comment
{Too Long!}
Posted 7 years ago
Regarding...
Delphi Prism Class..Object (class..end..new)
{Too Long!}
Read +Add Comment
Now that I have done more .net and Delphi Prism, I also wouldn't do a concatenation just to convert to string. You can actually do: MessageBox.Show( 3.3.ToString );
Posted 7 years ago
Regarding...
Delphi Prism String Concatenation (+)

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. Alternatively, you can use the System.Text.StringBuilder class which frequently but not always provides faster code.
Read +Add Comment
Oops! Embarassed The spelling errors are fixed now. Thanks for letting me know.
Posted 8 years ago
Regarding...
Delphi Prism String Concatenation (+)

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. Alternatively, you can use the System.Text.StringBuilder class which frequently but not always provides faster code.
Read +Add Comment
A good tip for implementing interfaces is, after you have added the IHuman to the class that is implementing it, you can right click on that IHuman and choose the Implement Interface Members.  It will then stub out all the pieces/parts associated with that interface.  BIG time saver.
Posted 8 years ago
Regarding...
Delphi Prism Interfaces

General Info: Interface

An element of coding where you define a common set of properties and methods for use with the design of two or more classes. Both interfaces and abstract classes are types of abstraction. With interfaces, like abstract classes, you cannot provide any implementation. However, unlike abstract classes, interfaces are not based on inheritance. You can apply an Interface to any class in your class tree. In a real sense, interfaces are a technique for designing horizontally in a class hierarchy (as opposed to inheritance where you design vertically). Using interfaces in your class design allows your system to evolve without breaking existing code.

Delphi Prism Interfaces

With Prism, you use the Interface keyword to define an interface and then you include one or more interfaces where you specify the single class inheritance (separated by commas).
Read +Add Comment
FWIW, there's a couple of Catcatenations in with the Concatentations ;-)
Posted 8 years ago
Regarding...
Delphi Prism String Concatenation (+)

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. Alternatively, you can use the System.Text.StringBuilder class which frequently but not always provides faster code.
Read +Add Comment
FWIW, good points. Nothing wrong with standards. I'll sweep thru and update all these examples. For what it's worth, I agree that private and protected probably could both be camel capped.
Posted 9 years ago
Regarding...
Delphi Prism Member Property (property..read..write)

Delphi Prism Member Property

Like Delphi, Delphi Prism uses a special property keyword to both get and set the values of properties. The read and write keywords are used to get and set the value of the property directly or through an accessor method. For a read-only property, leave out the write portion of the declaration. Prism also supports a shortcut syntax called implicit fields (known as auto-generated properties in C#): property CyborgAge: Integer; You can give properties any visibility you wish (private, protected, etc). It is common in Delphi and Delphi Prism to start member fields with "F" (FCName in our example) and drop the "F" with properties that manage member fields (CyborgName in our example).
Read +Add Comment
Although I don't think Microsoft makes it indisputably clear, this link: http://msdn.microsoft.com/en-us/library/x2dbyw72%28VS.71%29.aspx?ppud=4 Says that Properties should be Pascal Case and Protected (non-public?) instance fields should be Camel Case. So I think in your example, CyborgName should be Pascal, as it is, but the backing field should be fcName or Camel Case. Admittedly, they DON'T specifically say what to do with PRIVATE instance fields so that muddies the waters.  But if the backing fields are Pascal and properties are Pascal, then it gets harder to read the code and tell which is which. Of course, personally, I think having case sensitivity in a language is dumb and the same thing goes for these kinds of "case conventions". However, I believe that camel case for the (non-public) fields is the recommendation. FWIW.,
Posted 9 years ago
Regarding...
Delphi Prism Member Property (property..read..write)

Delphi Prism Member Property

Like Delphi, Delphi Prism uses a special property keyword to both get and set the values of properties. The read and write keywords are used to get and set the value of the property directly or through an accessor method. For a read-only property, leave out the write portion of the declaration. Prism also supports a shortcut syntax called implicit fields (known as auto-generated properties in C#): property CyborgAge: Integer; You can give properties any visibility you wish (private, protected, etc). It is common in Delphi and Delphi Prism to start member fields with "F" (FCName in our example) and drop the "F" with properties that manage member fields (CyborgName in our example).

Follow PrestwoodBoards on: 


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