Search
 
SCRIPT & CODE EXAMPLE
 

C

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.
Comment

PREVIOUS NEXT
Code Example
C :: allocating memory for 1Mb text file in C 
C :: c code to mips assembly converter online 
C :: parcel-builder put image in sub folder 
C :: arduino vscode upload choosing sketch 
C :: como somar em C 
C :: how to find adam number uasing loop in C 
C :: semicolong after for() loop stackoverflow 
C :: anthracnose pronounce 
C :: C #if, #elif and #else Directive 
C :: kstrdup 
C :: diamond dataset in r 
C :: worst fit program in c 
C :: code to reverse the words in a sentnce 
C :: ESP32 timerBegin(0, cpuClock, true); 
C :: c++ to assembly language converter online 
C :: brew autoremove 
C :: if statement shortcut c 
C :: getopt optstr 
C :: Odd-Even-inator with function in C 
C :: c refresher 
C :: string compare in c 
C :: + ********************* 
C :: Program optimization 
C :: split string at space C 
C :: write to console c 
Dart :: flutter appbar backbutton remove 
Dart :: python change type of elements in list 
Dart :: flutter textfield rounded 
Dart :: dart continue 
Dart :: hide debug flag flutter 
ADD CONTENT
Topic
Content
Source link
Name
2+7 =