制定条件循环条件?(Making a conditional loop condition?)
我想创建一个while循环,它将继续在两个条件之一下运行,其中选择的一个被确定为条件。 例如,它将是
while(if (c = true) a<b else b<a)
的行while(if (c = true) a<b else b<a)
。 这有什么简单的语法吗? 或者我是否必须采取粗暴的方式并执行以下操作?if (c = true) { while(a<b) { } } else { while(b<a) { } }
I would like to create a while loop where it will keep running under one of two conditions, where the one chosen is determined as a conditional. For example, it would be something along the lines of
while(if (c = true) a<b else b<a)
. Is there any simple syntax for this? Or would I have to go the brute way and do the following?if (c = true) { while(a<b) { } } else { while(b<a) { } }
原文:https://stackoverflow.com/questions/11662473
最满意答案
我不认为这是可能的。 对话框脚本不直接支持Tab控件,而是插入一个通用的“CONTROL”语句,其中插入了控件“SysTabControl32”。 您需要在代码中分配页面。
VS 2008 SP1中的新功能与WPF控件有关,但由于您提到使用WTL,我假设您使用的是win32对话框资源。
戴夫
I don't think it's possible. The dialog script does not support the Tab control directly, instead, it inserts a generic "CONTROL" statement in which the control "SysTabControl32" is inserted. You need to assign the pages in code.
The new feature in VS 2008 SP1 has to do with the WPF controls, but since you mention that you work with WTL I assume you work with win32 dialog resources.
Dave
相关问答
更多-
我只用以下参数运行VS2010 SP 1的Web安装程序。 这迫使它卸载并让我通过阻塞问题: VS10sp1-KB983509.exe / uninstall / force As life moves on, I chose a chose maybe not the best solution, but it is a solution, so here is what I did. I found an article, which talked about removing the entry fr ...
-
什么的ClearCase插件与Visual Studio 2008 SP1使用(What ClearCase plugin to use with Visual Studio 2008 SP1)[2023-08-12]
官方说明在此IBM页面中 CC-CQ-VS2008.zip(32位) CC-CQ-VS2008.zip(64位) 处理: 从下面的FTP链接下载相应的软件包到您的ClearCase,CCRC或ClearQuest主机。 将存档解压缩到临时位置。 按照ClearCase(CC_INSTRUCTIONS.txt)或ClearQuest(CQ_INSTRUCTIONS.txt)或ClearCase Remote Client(CCRC_INSTRUCTIONS.txt)概述的说明(从存档中提取)完成启用功能集成的 ... -
Visual Studio可以附带简单的Service Pack,但是你需要找到它,如果你的安装媒体说它是Visual Studio 2008 SP1,那么你好运,否则,一旦安装,请转到帮助 - >关于Microsoft Visual Studio并在那里你会看到你是否已经安装了SP1。 Visual Studio can come with slipstreamed Service Packs, however you need to find this out, if your installation ...
-
您应该清理您的注册表,以确保您没有任何以前安装的剩余条目。 You should clean up your registry to make sure you dont have any residual entry of previous installations.
-
Visual Studio 2008 SP1的版本号(专业版)(Version number for Visual Studio 2008 SP1 (professional))[2023-09-07]
我只是说“SP”。 你应该寻找的是“已安装的产品”中列出的实际修补程序(KB958502)(可能有很多'em)。 Mine just says "SP" as well. What you should be looking for is the actual hotfix (KB958502) listed under "Installed products" (there's probably a whole bunch of 'em). -
使用Visual Studio 2008设计选项卡控件(不含SP1)(Design Tab Control with Visual Studio 2008 (without SP1))[2023-08-21]
我不认为这是可能的。 对话框脚本不直接支持Tab控件,而是插入一个通用的“CONTROL”语句,其中插入了控件“SysTabControl32”。 您需要在代码中分配页面。 VS 2008 SP1中的新功能与WPF控件有关,但由于您提到使用WTL,我假设您使用的是win32对话框资源。 戴夫 I don't think it's possible. The dialog script does not support the Tab control directly, instead, it inserts ... -
Visual Studio 2008 SP1和Visual SourceSafe 2005(Visual Studio 2008 SP1 and Visual SourceSafe 2005)[2023-10-07]
工具 - >选项 - >源控制 - >插件选择。 选择Microsoft Visual SourceSafe Tools->Options->Source Control->Plug-in Selection. Select Microsoft Visual SourceSafe -
关于你的实际问题, 此页面指定VS期望的完整语法作为构建工具的输出。 Regarding your actual question, This page specifies the full syntax expected by VS as the output of the build tools.
-
下载SP1的安装程序并运行它。 它在这个页面上 。 Download the installer for SP1 and run it. It is on this page.
-
我知道的只有一些小问题。 在VS2010中创建的新C#项目将依赖于Microsoft.CSharp.dll,这是新的“dynamic”关键字的运行时支持程序集。 当您将目标框架版本更改为3.5时,您将收到有关此程序集的警告,您必须手动将其删除。 此外,即使您定位了早期版本的框架,您的代码也将由新的C#4.0编译器编译。 这可能是compat问题的根源,代码与3.0编译器的编译方式不同。 更常见的compat问题是不应该在3.0中编译但由于编译器错误而导致的代码。 当然,这不是一个真正的问题,但如果您签入由仍 ...