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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Typecasting with Deplhi8

Status
Not open for further replies.

FabioB

Programmer
Dec 27, 2004
1
GB
I need to typecast a 4-byte long integer variable into a single variable using Deplhi8. This is because I am reading a binary file in which single precision real numbers are stored with all four bytes swapped compared to the normal PC format. I did this typecasting ('MySingleVar := single(MyLongintVar)') when I was using Pascal for Windows and Deplhi 4, but now the compiler does not want to see this kind of operation.
Is anybody of you aware of any possible solution for this issue?
Thank you all.
 
welcome to the wonderful world of .NET and marshalling.
this is one of the reasons I stay away from this language...

--------------------------------------
What You See Is What You Get
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top