IT SOLUTIONS
Your full service technology partner! 
-Collapse +Expand
To/From Code
-Collapse +Expand Cross Ref Guide
-Collapse +Expand Members-Only
Sign in to see member-only pages.
   ► KBTo/From GuidesC++/CLI  Print This     

Code Blocks (C++/CLI and Delphi Prism Cross Reference Guide)

By Mike Prestwood

C++/CLI versus Delphi Prism: A side by side comparison between C++/CLI and Delphi Prism.

 
Language Basics
 

Language basics is kind of a catch all for absolute beginner stuff. The items (common names) I chose for language basics is a bit random and include items like case sensitivity, commenting, declaring variables, etc.

Code Blocks

[Other Languages] 

Languages Focus

The rules for code blocks within a language dictate where you can declare variables, how you "bracket" code, etc.

C++/CLI:   { }

Same as standard C++. For C++, Java, JavaScript, and PHP, I prefer to put the first { at the end of the first line of the code block as in the example above because I see more C++ formatted that way.

Syntax Example:
class Cyborg {
public: System::Void IntroduceYourself() {
MessageBox::Show("Hi");
}
};
Delphi Prism:   begin..end

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

Syntax Example:
function DoSomething : integer;
var
 a, b : integer;
begin
 a := 1;
 b := 2;
 var c : integer; //Prism allows inline (local) variables.
 c := a + b;
  
 result := c;
end;












Go ahead!   Use Us! Call: 916-726-5675  Or visit our new sales site: 
www.prestwood.com


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