For Programmers: Free Programming Magazines  


Home > Archive > Extreme Programming > March 2004 > How does this C function work?









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author How does this C function work?
Emre Akbag

2004-03-27, 11:56 pm

Hello out there,

I'm working currently on a program, which is supposed to import an excel
file into a mySql database. I've found following function in internet. It is
supposed to convert HEXA-Decimal format into ASCII. The problem is: I don't
know, how exactly it works!!! Can any C-Expert help me?

I appreciate you anyway, for reading and/or writing back! :-))

Best, Emre

int getascii(char *bytes, int pos, int chars, char *str) {
int i;

bytes += pos;
for (i = 0; i < chars; i++) {
*str++ = *bytes++;
}
*str = '\0';
return chars;

}


Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com