Jump to content
The simFlight Network Forums

Recommended Posts

Posted

Is there a way to represent numbers directly in binary format? For example, instead of writing ipc.writeUB(0x1234, 0xF2), write ipc.writeUB(0x1234, 0b11110010) ?
I can't seem to find anything that shows how to indicate the number is binary.

Thanks,

Al

  • ark1320 changed the title to Representing Binary Values Directly?
Posted
11 hours ago, ark1320 said:

instead of writing ipc.writeUB(0x1234, 0xF2), write ipc.writeUB(0x1234, 0b11110010) ?

Maybe, I don't know though - why not just try it? I don't know if lua supports "0b" for binary, but should be easy to write a quick script to test / check this.

11 hours ago, ark1320 said:

I can't seem to find anything that shows how to indicate the number is binary.

Me neither - it would be in the general Lua documentation, not in FSUIPC's documentation. But I would think that it would be 0b, and if that doesn't work then it isn't supported.

John

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.