| T O P I C R E V I E W |
| Mike Buess |
Posted - 05/27/2002 : 1:24:05 PM What is the proper way to pass string and character arguments to an OriginC string function? For example,
int test(string str1="abcdef", char ch1='c') { return str1.Find( ch1 ); }
test()=; test()=2 //as expected, but
test(abcdef,c)=; test(ABCDEF,C)=6
This function returns the string length regardless of the arguments I use. What am I doing wrong?
Mike Buess Origin WebRing Member |
| 2 L A T E S T R E P L I E S (Newest First) |
| Mike Buess |
Posted - 05/27/2002 : 8:26:23 PM Thanks, CP.
Mike Buess Origin WebRing Member |
| cpyang |
Posted - 05/27/2002 : 3:02:35 PM test("abcdef", 'c')=;
You must indicate passing as character or as string to avoid confusion.
CP
Edited by - cpyang on 05/27/2002 15:04:35 |
|
|