SphereServer BugTracker - SphereServer
View Issue Details
0002150SphereServerexecutable - windows buildpublic21-03-13 21:4222-03-13 21:30
xwerswoodx 
RanXerox 
normalmajoralways
closedno change required 
 
 
Automated (specify build number)
None
None
0002150: STRCMP(I)
<eval STRCMP(1000, 299)>
RETURN -1

Normally, string 1 greater than string 2 but it gives the answer 1000 is lesser than 299 (-1)

[QUOTE FROM WIKI]
Return Value Meaning
-1 string1 is less than string2
0 The two strings are equal
1 string1 is greater than string2
No tags attached.
Issue History
21-03-13 21:42xwerswoodxNew Issue
21-03-13 22:22darksun84Note Added: 0001508
21-03-13 23:52xwerswoodxNote Added: 0001509
22-03-13 00:03darksun84Note Added: 0001510
22-03-13 20:48xwerswoodxNote Added: 0001511
22-03-13 20:52darksun84Note Added: 0001512
22-03-13 21:02xwerswoodxNote Added: 0001513
22-03-13 21:19darksun84Note Added: 0001514
22-03-13 21:28RanXeroxNote Added: 0001515
22-03-13 21:30RanXeroxStatusnew => closed
22-03-13 21:30RanXeroxAssigned To => RanXerox
22-03-13 21:30RanXeroxResolutionopen => no change required

Notes
(0001508)
darksun84   
21-03-13 22:22   
It's correct, the comparison happens by lexicographical order
(0001509)
xwerswoodx   
21-03-13 23:52   
What is it? Can you give me a table or is the same table with ASCII?
(0001510)
darksun84   
22-03-13 00:03   
I think it's the ascii table
(0001511)
xwerswoodx   
22-03-13 20:48   
So what is the differences between STRCMP and STRCMPI
(0001512)
darksun84   
22-03-13 20:52   
This is not the correct place for asking, you should asking question in the forum or consult the wiki.
(0001513)
xwerswoodx   
22-03-13 21:02   
No I don't ask any question, I think if they works same, why we use STRCMPI. Because I remember "I" is illogical order so STRCMPI(1000, 299) must turn 1 not -1.
(0001514)
darksun84   
22-03-13 21:19   
I stands for "Ignore case"

http://wiki.sphere.torfo.org/index.php/Chapter_10#STRCMPI [^]
(0001515)
RanXerox   
22-03-13 21:28   
1000 *is* less than 299 when they are compared using string... if you want a numerical comparison, use greater than or less than operators.