How to translate the CC ++ program into Delphi (2)

zhaozj2021-02-17  46

.

Anatomy of a c header

Back to Contents

## To do

2. Conversion Basics

2.1. Naming

........................ ..

How snow the c names be translated into delphi?

The C-programmer usually uses upper case letters for type identifiers, eg MY_TYPE. In Delphi, a type identifier has a T-prefix followed by the name of the type in mixed (proper) case. Underscores are not used. The Delphi-like Translation of the c.y Identifier my_type is tmytype.

IN C Older Header Files The Pointer-Type IS named lpmy_type. In Translation To Delphi It Should Be Prytype To Conform with Borland's Style.

Constants Are Usually Named Identically To The Original Name, Including Upper Case Letters and Underscores.

A FEW EXAMPLES:

转载请注明原文地址:https://www.9cbs.com/read-30428.html

New Post(0)