[Mysql-cocoa-users] SMySQL_test
Brought to you by:
sergecohen
|
From: Famille GOUREAU-S. <sui...@wa...> - 2002-05-22 04:38:03
|
Hi,
I've got a problem with the following bunch of source file. It is used
(and works perfectly) in SMySQL_Test, the software that tests SMySQL
functions.
SMySQLResult *result;
NSDictionary *row;
unsigned int count, i;
result = [connection queryString:@"select * from test"];
count = [result numOfFields];
while (row = [result fetchRowAsDictionary]) {
for (i=0; i<count; i++) {
NSString *name = [names objectAtIndex:i];
NSLog(@"%@ : %@\n", name, [row objectForKey:name]);
}
}
My problem lies in the line : while (row = [result
fetchRowAsDictionary]) {
I'm quite new with C, C++ or ObjC, but I thought that between
the "(...)" of a while there should be a test. The "=" instruction is
not a test...
Does anybody have an idea to explain this syntax that is perfectly
understood by PB (if not by me) ?
Thanks.
Camille
|