1

Im kind of a beginner with programming but here is the thing:

I have different variables set as local, these variables are strings of chars, messages and at the same time I have a set of Booleans that will fill with True or False depending of some circumstances.

The idea is to show a single Message Box containing these variables ONLY IF the booleans are False.

An example in pseudocode:

Local string Greetings = "Hi, my name is"

Local string Name1 = "John"
Local string Name2 = "James"

Local Boolean name1 = .T.

Local Boolean name2 = .T.


If Name1 (Have some conditions)
name1 = .T.
endif

If name2 (Some conditions)
name2 = .F.

If name1 == .T. OR name2 == .T.
MsgBox(Greetings+":"+name1+name2,"Messagebox","Alert")

Endif

Sorry I cant describe a lot about which code it is. but it is like Clipper with Xbase.

The problem I have is than even if the condition of these variables are false, the message box will show the both of them, Do I need to put all the contingencies there? for example if I have 3 booleans, Do I need to do this with True,False,False - False,True,False etc?

Best Regards.

4

1 回答 1

0

我看不出来怎么name1可能。它开始时,如果您的第一个条件评估为,则再次分配它。必须如此。FALSETRUETRUETRUEname1TRUE

根据您的逻辑,您可能希望Local Boolean name1 = .F.在开始时或name1 = .F.在您的第一个IF.

于 2014-05-04T23:23:42.007 回答