Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > struct

Reply
Thread Tools

struct

 
 
Back9
Guest
Posts: n/a
 
      05-19-2010
Can anyone explain the difference between f and d in struct unpack?
When using them, some data work in either one not both.
To me it seems to be same,

TIA
 
Reply With Quote
 
 
 
 
Gary Herron
Guest
Posts: n/a
 
      05-19-2010
On 05/19/2010 02:53 PM, Back9 wrote:
> Can anyone explain the difference between f and d in struct unpack?
> When using them, some data work in either one not both.
> To me it seems to be same,
>
> TIA
>


'f' is single precision float (32 bits), and
'd' is a double precision float (64 bits)

Gary Herron

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can *common* struct-members of 2 different struct-types, that are thesame for the first common members, be accessed via pointer cast to either struct-type? John Reye C Programming 28 05-08-2012 12:24 AM
Typedef A references struct B which references struct A which... DanielEKFA C++ 8 05-16-2005 10:26 AM
struct in struct Gunnar G C++ 14 06-02-2004 06:43 PM
struct my_struct *p = (struct my_struct *)malloc(sizeof(struct my_struct)); Chris Fogelklou C Programming 36 04-20-2004 08:27 AM
implementing a templated struct within a templated struct RA Scheltema C++ 3 01-06-2004 11:25 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57