I can't find any examples of someone using ASCII Character 24 as a delimiter,
unless there is a natural C function that can find the delimiter like StrLen
can find the null terminator, or unless there is a safe and quick way to use
Replace in Notepad to change all of the ASCII Character 24s into null
terminators, I'll have to write my own string function.
I am not experienced at all with C, but in Basic I could write this very easily.
I would imagine it would work like this:
Loop StrLen(String) times
{
UInt16 CharacterPointer = 0
UInt16 FieldPointer = 0
Look at String[CharacterPointer], if it is anything other than '\', continue.
Concatenate String[CharacterPointer] onto a temp string.
If it is '\', then if (CharacterPointer+2) is less than StrLen(String),
CharacterPointer = CharacterPointer + 2 and then:
{
Have a FieldPointer value, run a switch on it. If it equals 0, point the temp
string into Record->prodno(first field), if it is 1, put it into desc, etc.
Then of course, FieldPointer++
}EndIf here
CharacterPointer++
}
I think pretty much sums up the function I'd need to right, does it sound right?
--
For information on using the Palm Developer Forums, or to unsubscribe, please
see http://www.palmos.com/dev/support/forums/