Fredrik Holmqvist wrote (2007-10-18, 12:09:34 [+0200]): > It could also be a lot less nested by using the continue keyword: > > entry_ref ref; > for (int i = 0; refsReceivedMessage->FindRef("refs", i, &ref) == B_OK; > i++) { > BFile file(&ref, B_READ_ONLY); > BNodeInfo nodeInfo(&file); > char mimeString[B_MIME_TYPE_LENGTH]; > if (nodeInfo->GetType(mimeString) != B_OK) > continue; > > BMimeType fileType(mimeString); > BMimeType superType; > if (fileType->GetSupertype( &superType) != B_OK) > continue; > > if (superType == "audio" || superType == "video") > AppendToPlaylistRecursive(ref, playlist); > } Yep, I am actually a fan of this "least-nested style" myself. Best regards, -Stephan