Free 14-Day Evaluations    
Product Downloads    

Sign in     


DESKTOP MOBILE DOWNLOAD PURCHASE SUPPORT INFO COMPANY
 Home  >>  Support  >>  Knowledge Base

_StrnCmp() Fails Comparing Single Characters

Using the CScript _StrnCmp() function to compare one character from each string, the return value is always 0. If the compared strings are at least two characters long, it works properly in most cases. However, the following script fails as well:

fline=” 1) ‘p5669050.301288 EDIT STATUS'”;
cdash=”*-*”;
dash=MidStr(fline,26,1);
xdash=”*” + dash + “*”;
rc=_StrnCmp(xdash,2,cdash,2,2);
rcstr=_Str(rc);
MsgBox(rcstr,”xdash=” + xdash + ” cdash=” + cdash,0);

CR 721

Comments are closed.

  Copyright © 2024 Century Software, Inc. All Rights Reserved999 TERMS OF USE PRIVACY POLICY EULA