#include <stdio.h>
#include <string.h>
#include <stdlib.h>

void my_ftoa(float value, char *string) 
{ 
    if (value < 0) { 
        //*string++ = '-'; absolut value
        value = -value; 
    } 
    
    sprintf(string, (const char *) "%lu.%03u", 
                    (long) value, 
                    (int) ((value - (long) value) * 1000. + 0.5)); 
     
    return;
}

/*
void htoa(unsigned char value, char *string) 
{     
    sprintf(string, (const far rom char *) "%x", value & 0xff); 
    return;
}
*/
 
unsigned long str_num(unsigned char *string, unsigned char begin)
{
    unsigned long number=0;
    unsigned int mult[7]={0,1,10,100,1000,10000};
    unsigned char end = strlen(string)-3;
    char lenght = end-begin;
    
    if(begin>=end)return 0;
    for(lenght;lenght>=0;lenght--)
    {
        number += (string[end-lenght]-48)*mult[lenght];
    }
    
    return number;
}