View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0002150SphereServerexecutable - windows buildpublic21-03-13 21:4222-03-13 21:30
Reporterxwerswoodx 
Assigned ToRanXerox 
PrioritynormalSeveritymajorReproducibilityalways
StatusclosedResolutionno change required 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0002150: STRCMP(I)
Description<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
TagsNo tags attached.
Nightly VersionAutomated (specify build number)
Experimental FlagsNone
Option FlagsNone
Internal Build Number
Attached Files

- Relationships

-  Notes
(0001508)
darksun84 (reporter)
21-03-13 22:22

It's correct, the comparison happens by lexicographical order
(0001509)
xwerswoodx (reporter)
21-03-13 23:52

What is it? Can you give me a table or is the same table with ASCII?
(0001510)
darksun84 (reporter)
22-03-13 00:03

I think it's the ascii table
(0001511)
xwerswoodx (reporter)
22-03-13 20:48

So what is the differences between STRCMP and STRCMPI
(0001512)
darksun84 (reporter)
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 (reporter)
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 (reporter)
22-03-13 21:19

I stands for "Ignore case"

http://wiki.sphere.torfo.org/index.php/Chapter_10#STRCMPI [^]
(0001515)
RanXerox (developer)
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.

- Issue History
Date Modified Username Field Change
21-03-13 21:42 xwerswoodx New Issue
21-03-13 22:22 darksun84 Note Added: 0001508
21-03-13 23:52 xwerswoodx Note Added: 0001509
22-03-13 00:03 darksun84 Note Added: 0001510
22-03-13 20:48 xwerswoodx Note Added: 0001511
22-03-13 20:52 darksun84 Note Added: 0001512
22-03-13 21:02 xwerswoodx Note Added: 0001513
22-03-13 21:19 darksun84 Note Added: 0001514
22-03-13 21:28 RanXerox Note Added: 0001515
22-03-13 21:30 RanXerox Status new => closed
22-03-13 21:30 RanXerox Assigned To => RanXerox
22-03-13 21:30 RanXerox Resolution open => no change required


Copyright © 2000 - 2010 MantisBT Group
Powered by Mantis Bugtracker