Jump to content
The simFlight Network Forums

Recommended Posts

Posted

Hello Pete, 

 

I´ve got a short question. How to read a special bit of an offset?

 

I am using this code: 

  if FSUIPC_read($7397,1,@Value,dwresult) then
    if FSUIPC_Process(dwResult) then
      result := Value;

But how to get single bits of this offest?

 

Best Regards Marco

Posted

I´ve got a short question. How to read a special bit of an offset?

 

I am using this code: 

 if FSUIPC_read($7397,1,@Value,dwresult) then if FSUIPC_Process(dwResult) then result := Value; 

But how to get single bits of this offest?

 

You have all of the bits in the resulting 1 byte Value. A byte contains all 8 bits. The rest is simple programming! Test them as you wish -- if you don't know how to use logical functions in a program (And, Or, etc) I suggest you get a book on Delphi. I don't know it so cannot give you examples. But to learn about numbers, bits and bytes please see the FAQ subforum -- there's a thread on this subject.

 

Pete

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. Guidelines Privacy Policy We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.