Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

C++ related translations

Status
Not open for further replies.

tvidigal

Programmer
Sep 8, 2003
19
0
0
PT
Hi again,
could anyone help me with some C++ translations!

in c++ i have: float *mydouble

and in delphi i try to use:
type
float : Single
PFloat : PSingle
PPFloat : ^PFloat

what i'm not sure about is if:
float *mydouble (c++) is the same that var myfloat : PPFloat or and array of Float!

another thing i quite don't undestand is the difference of:
float *inputs & float* inputs, and how they are converted to delphi;

keeping in translations, here is more :-D:
what is the similar convention in delphi when you have something like in C++: if ( myBPM < 4.0f )

and finnaly :)

what's the meaning and how to translate it to delphi:
Value = val2 < .5f ? 1.f : 0.f;

thank you very much!
Best Regards




 
The Pascal equivalent of C++ Float datatype is the 'Real' datatype. In Delphi 'Real' is divided into many floating point datatypes among which Double and Extended are most used. Read up on 'Double' in the Delphi help for more information.

C++ Delphi
----------------------------------
float *mydouble Var MyDouble : PExtended;

Value = val2 < .5f ? 1.f : 0.f; if val2 < 0.5 then Value := 1 else Value := 0.

I do not understand what the common 'f' stands for in C++ but you should get the general idea.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top