Sort an 245 Sign long Strin

General discussion on mikroPascal PRO for PIC.
Post Reply
Author
Message
corado
Posts: 399
Joined: 28 Mar 2009 11:03

Sort an 245 Sign long Strin

#1 Post by corado » 15 Apr 2014 19:58

Hallo, with
res := memchr(@txt, 'e', 16); // example locates first occurrence of the letter 'e' in the string 'txt' in the first 16

I can locate a sign in the first 16 Chars...
How can I after that, locate the nixt one?

Maybe I have 1.23;2.34;5.67;7.89 and so on....

How Can I sort this into single Numbers like
1.23
2.34
5.67
7.89
?

janni
Posts: 5373
Joined: 18 Feb 2006 13:17
Contact:

Re: Sort an 245 Sign long Strin

#2 Post by janni » 16 Apr 2014 01:49

Simply copy the chars one by one to another string till you find the semicolon, then start reading following chars to another string till semicolon, and so on..

Post Reply

Return to “mikroPascal PRO for PIC General”