Jamie McMullin wrote:
> Looking into the delimeter, \30, I have come figured out that it
> is ascii character 24 and is represented as ^X 
> 
> I have never come across this character before, I don't know why
> it is used and how it corresponds to the keyboard or any C functions.

It doesn't matter that you've never seen it before.  It doesn't
matter how it's used.  It doesn't matter how it corresponds to the
keyboard.  It doesn't matter IF it corresponds to the keyboard.

In C, characters are just integers.  The octal 30 is just a decimal
24 which is just binary 00011000 or hexadecimal 18.

That character might mean one thing in ASCII and another in EBCDIC
and something else in some other character set (like the DOS 8-bit
character set which has the smiley faces in it).

The only thing that's important about that character is that it is
the number that it is and you can see that in your data it serves
as a delimiter.

If you want to find the first occurrence of that in a big list
(array, memory region) of characters, you could do this:

        int find_delimiter_position (Char* str)
        {
            const Char delimiter = 24;
            // or "const Char delimiter = 030;" if you prefer.

            int pos = 0;
            while (str[pos] != delimiter)
            {
                pos++;
            }

            return pos;
        }

Of course, that will keep going forever and ever until it finds
that character, so you might want to add logic to stop after
however long is needed.

  - Logan

-- 
For information on using the Palm Developer Forums, or to unsubscribe, please 
see http://www.palmos.com/dev/support/forums/

Reply via email to