返回 [英] return

查看:83
本文介绍了返回的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我如何观察"返回"返回的价值?例如:

How can i observed worth returned by "return" e.g :

int max( int nA, int
nB)

{

return (nA> nB?nA:nB);

}

推荐答案

在调用
max 的行上放置一个断点。当它停止时,按< F10>执行它。或者,如果您在
max 内,请按< F10>或< Shift + F11>直到你退出
max
。然后"最大返回"值将显示在"局部"和"自动"窗口中,可以在"调试"菜单中找到。

Put a breakpoint at the line that calls max. When it stops, press <F10> to execute it. Or, if you are inside max, press <F10> or <Shift+F11> until you exit from max. Then the "max returned" value will appear in Locals and Autos windows, which can be found in Debug menu.

如果你想在从
max返回之前看到它,然后实现最后'}'行,然后将"EAX"添加到Watch窗口。

If you want to see it before returning from max, then achieve the last ‘}’ line, then add "EAX" to Watch window.

似乎您还可以添加"

Seems that you can also add "


ReturnValue"到观看窗口。它将在最后一个< F10>之后显示。执行
max
ReturnValue" to Watch window. It will be displayed after the last <F10> that executed max.


这篇关于返回的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆