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

问题描述

我根据以下条件设置了一个布尔值


公共STRData为字符串

公布BooleanRedFlag为boolean = False


如果STRData =""然后

_BooleanRedFlag = TRue

end如果


应该发生什么是STRData字符串返回

什么都不应该设置我的布尔标志。

当我在我的代码中添加断点和监视时,STRData值

表示它是真的。


我错过了它应该读作"

I have setup a boolean based on the following conditions

Public STRData as string
Public BooleanRedFlag as boolean = False

If STRData = "" then
_BooleanRedFlag = TRue
end If

What should happen is that is the STRData string is returned with
nothing it should set my boolean flag.
When i add a break point and a watch to my code the STRData value
says its true.

What am I missing it should read "".

推荐答案



看起来你已经设置了" = true

looks like you''ve set the "" = true




看起来你已经设置了" = true


looks like you''ve set the "" = true



是的,如果STRDAta =",我怎么能将它设置为真但是我仍然需要

保持STRdata一个字符串

Yes how can i set it to be true if STRDAta = "" but i still need to
keep STRdata a string




是的,如果STRDAta =""我怎么能将它设置为true但我仍需要

保持STRdata字符串 - 隐藏引用文字 -


- 显示引用文字 -


Yes how can i set it to be true if STRDAta = "" but i still need to
keep STRdata a string- Hide quoted text -

- Show quoted text -



是什么代码的其余部分以及你在哪里提供断点?

你有正确的事先知道它不正确。


Dim variable1 As String

Dim variable2 As Boolean = False

如果variable1 =""然后

variable2 = True

结束如果

whats the rest of the code and where are you putting the break point?
you have it correct there is something preceding it not correct.

Dim variable1 As String
Dim variable2 As Boolean = False
If variable1 = "" Then
variable2 = True
end if


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

07-09 15:56