简体   繁体   English

if([aString writeToFile:@“outfile”atomically:YES])

[英]if([aString writeToFile: @“outfile” atomically: YES])

For some code like 对于一些像

if([aString writeToFile: @"outfile" atomically: YES])

I am wondering if atomically is a parameter or a parameter name? 我想知道atomically是参数还是参数名称?

Parameter name would be what the variable is called. 参数名称将是变量的名称。 I guess you could call it a parameter but parameter is a very general term in my opinion. 我想你可以把它称为参数,但在我看来,参数是一个非常通用的术语。

I think the correct thing to say is that it's the method name, It's a part of it. 我认为正确的说法是它是方法名称,它是它的一部分。 Just that you can have parameters in between to kind of split it up. 只是你可以在两者之间分配参数。

And btw this is one of the things I love in objective c, the code gets so readable thanks to it :) 顺便说一句,这是我喜欢的目标c之一,代码因此而变得如此可读:)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 writeToFile:atomically:YES是否有文件大小限制? - Does writeToFile:atomically:YES have a limit for file size? writeToFile以原子方式返回NO - writeToFile atomically returns NO 将变量添加到writeToFile:atomically: - Add Variable to writeToFile:atomically: WriteToFile:自动弃用警告 - WriteToFile:atomically deprecate Warning NSKeyedArchiver或[NSArray writeToFile:atomically:]? - NSKeyedArchiver or [NSArray writeToFile:atomically:]? 获取writeToFile:原子地:保存到的URL - Getting writeToFile:atomically: URL saved to NSMutableArray writeToFile:atomically总是在设备上返回NO,但在模拟器上可以正常工作 - NSMutableArray writeToFile:atomically always returns NO on device but works fine on simulator 原子地使用writeToFile:atomic:连续不起作用…为什么? - Using writeToFile:atomically: consecutively doesn't work…why? 使用writeToFile:atomically:encoding:error:与createFileAtPath:contents:attributes时,不同的编码结果: - Different encoding results when using writeToFile:atomically:encoding:error: vs. createFileAtPath:contents:attributes: 为什么在创建新文件时使用NSFileManager而不是仅使用NSData的writeToFile:atomically:方法? - Why use an NSFileManager rather than just using NSData's writeToFile:atomically: method when creating a new file?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM