Skip to content
View in the app

A better way to browse. Learn more.

The AVSIM Community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

float64 and uint32 code?

Featured Replies

What does float64 and uint32 do...I understand the rest of the c codemostly but these have me stumped. I looked through the tutorial coming up with nothing. thx for any help (:

  • Author
  • Moderator

>What does float64 and uint32 do...I understand the rest of>the c code>mostly but these have me stumped. I looked through the>tutorial coming up with nothing. thx for any help (:float and FLOAT32 are a declarations for a 4 byte floating point variable.double and FLOAT64 are all declarations for an 8 byte floating point variable. Floating point number data from -1.79E + 308 through 1.79E + 308.int is a declaration for a 4 byte integer variable. Integer (whole number) data from -2^31 (-2,147,483,648) through 2^31 - 1 (2,147,483,647).UINT32 is a declaration for an "unsigned" integer variableSINT32 is a declaration for a "signed" integer variableConfusing? Certainly, but why all the various ways to declare variables? Part of the answer lies in realizing that the explicit declaration types such as FLOAT64, UINT32, SINT32, et all are part of an older set of C specifications.Better coding will make use of the newer "C Standards" which allow for the data declarations to "fit best" for the machine on which the code is being run, such as int, float, double, etc.*The idea is to fit the types to the machine. On an IBM PC running Windows 3.1, for example, an int and a short are both 16 bits, and a long is 32 bits. On a Windows XP machine or a Macintosh PowerPC, however, a short is 16 bits, and both int and long are 32 bits. The natural word size on a Pentium chip or a PowerPC G3 or G4 chip is 32 bits. Because this allows integers in excess of 2 billion (see Table 3.3), the implementers of C on these processor/operating system combinations did not see a necessity for anything larger; therefore, long is the same as int. For many uses, integers of that size are not needed, so a space-saving short was created. The original IBM PC, on the other hand, has only a 16-bit word, which means that a larger long was needed.Now that 64-bit processors, such as the IBM Itanium, AMD Opteron, and PowerPC G5, are beginning to become more common, there's a need for 64-bit integers, and that's the motivation for the long long type.The most common practice today is to set up long long as 64 bits, long as 32 bits, short as 16 bits, and int to either 16 bits or 32 bits, depending on the machine's natural word size. In principle, however, these four types could represent four distinct sizes.The C standard provides guidelines specifying the minimum allowable size for each basic data type. The minimum range for both short and int is

Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator

(After picking my chin of the floor). If im understanding this, float 32/64 is how much "juice" needed to spend on the varible.(ive noticedmost gauges use 64) >UINT32 is a declaration for an "unsigned" integer variableuint 32 is to decide(im tured of when bla bla bla)>SINT32 is a declaration for a "signed" integer variableTo go get data and ajust your gauge....Am I right?:-hmmm

  • Author
  • Moderator

To make life more simple, stick to these three basic declarations:int (four bytes) Use for integers, i.e. whole numbersfloat (eight bytes) Use for floating point, i.e., numbers with decimalsbool (one byte) Use for simple on/off variables, i.e., "true" or "false"Let the computer running the .dll worry about the rest. It will automatically set aside the minimum amount of memory needed for each variable you declare. ;)And no, 32 and 64 simply designate how many bytes of memory to set aside for the variable, IOW you are forcing a specific number of bytes for each variable.

Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.