StrSpn and StrCSpn functions in the help

Beta Testing discussion on mikroPascal PRO for PIC.
Post Reply
Author
Message
Dany
Posts: 3854
Joined: 18 Jun 2008 11:43
Location: Nieuwpoort, Belgium
Contact:

StrSpn and StrCSpn functions in the help

#1 Post by Dany » 20 Nov 2010 18:41

Hi,
I think that the description of "StrSpn" and "StrCSpn" are exchanged. Anyway, in the replacement lib from Janni/Yo2lio the descriptions are different with respect to those in the help.

Thanks in advance! :D
Kind regards, Dany.
Forget your perfect offering. There is a crack in everything, that's how the light gets in... (L. Cohen)
Remember when we were young? We shone like the sun. (David Gilmour)

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

Re: StrSpn and StrCSpn functions in the help

#2 Post by janni » 20 Nov 2010 23:44

Dany wrote:I think that the description of "StrSpn" and "StrCSpn" are exchanged. Anyway, in the replacement lib from Janni/Yo2lio the descriptions are different with respect to those in the help.
They sound different but mean the same :) .

Compare the two sentences:
Computes the length of the maximum initial segment of the string S1
which consists entirely of the characters from the string S2
The function returns the index of first character located in s1 that does not match a character in s2.
Now consider a string S1 of which first 2 chars may be found in S2. According to first sentence, result of StrSpn equals 2. According to the second description, result will equal 2, as well, because that's the index of first char not belonging to S2.

It's similar with the StrCSpn function.

User avatar
slavisa.zlatanovic
mikroElektronika team
Posts: 1321
Joined: 07 Apr 2009 09:39

Re: StrSpn and StrCSpn functions in the help

#3 Post by slavisa.zlatanovic » 01 Dec 2010 15:04

Hi!

I'll notify our Help developers regarding this issue. It will be fixed in the next compiler release.
Sorry for the inconvenience.
Best regards
Slavisa

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

Re: StrSpn and StrCSpn functions in the help

#4 Post by janni » 01 Dec 2010 16:55

Hi Slavisa,

There doesn't seem to be a need for changes. Both functions work according to their descriptions.
True, I used another way to describe their functioning in a replacement lib, but the meaning is the same, even if at first sight the logic seems to be reversed.

User avatar
slavisa.zlatanovic
mikroElektronika team
Posts: 1321
Joined: 07 Apr 2009 09:39

Re: StrSpn and StrCSpn functions in the help

#5 Post by slavisa.zlatanovic » 02 Dec 2010 13:28

Ok!

It was a minor misunderstanding.
:)
Best regards
Slavisa

Post Reply

Return to “mikroPascal PRO for PIC Beta Testing”