Horje
float da 4 byte Code Example
float da 4 byte
// questo va dichiarato esternamente al programma

union SCOMP_FLOAT	// union per scomporre un float
{
 float T1;
 char Tb[4];	
} S_FLOAT;


// all'interno della funzione

S_FLOAT.T1 = valore_float

// ora S_FLOAT.Tb[] contiene i 4 byte che compongono il valore. 

S_FLOAT.Tb[0] = byte1;
S_FLOAT.Tb[1] = byte2;
S_FLOAT.Tb[2] = byte3;
S_FLOAT.Tb[3] = byte4;

// ora S_FLOAT.T1 contiene il valore float ricostruito.




C

Related
Convert String to DateTime Code Example Convert String to DateTime Code Example
#include<stdio.h> main() { int *p = 15; printf("%d",*p); } Code Example #include<stdio.h> main() { int *p = 15; printf("%d",*p); } Code Example
xamarin command listview button Code Example xamarin command listview button Code Example
c for result Code Example c for result Code Example
degrees f to c Code Example degrees f to c Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
7