ios – stringWithFormat在LLDB中不工作

ios – stringWithFormat在LLDB中不工作,第1张

概述参见英文答案 > Why can’t LLDB evaluate this expression?                                    4个 为什么这不工作? (lldb) po [NSString stringWithFormat:@"%f", 1.0]error: too many arguments to method call, expected 1, 参见英文答案 > Why can’t LLDB evaluate this expression?                                    4个
为什么这不工作?

(lldb) po [Nsstring stringWithFormat:@"%f",1.0]error: too many arguments to method call,expected 1,have 2error: 1 errors parsing Expression

但是这样做:

(lldb) p (voID)printf("%f",1.0)1.000000

在LLDB中不支持Objective-C可变参数语法?

解决方法 正如Martin R在评论中指出的那样,显然是 general LLDB issue with variable argument lists.

另一方面,作为Patrik Schmittat pointed out,-initWithFormat:工作很好:

(lldb) po [[Nsstring alloc] initWithFormat:@"%f",1.0]1.000000

我提出了一个雷达:rdar://15261415 (stringWithFormat not working in LLDB)

总结

以上是内存溢出为你收集整理的ios – stringWithFormat在LLDB中不工作全部内容,希望文章能够帮你解决ios – stringWithFormat在LLDB中不工作所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/web/1030332.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-23
下一篇 2022-05-23

发表评论

登录后才能评论

评论列表(0条)

保存