Weired happening in LS code

It is really weired: When I try to debug LotusScript code and following code is reached, the debugger quits itself without any warning:

Dim valboolean As Boolean

valboolean = ( doc.ShipmentType(0) = “1” )

Debugger quits at the second line.

Why? Thanks!

Subject: Weired happening in LS code

Works for me (run from an agent).

Subject: RE: Weired happening in LS code

In LS, is there any difference between:

This statement:

If( doc.ShipmentType(0) = “1” ) Then

Call UpdateOrderDoc

End If

and this statement:

If doc.ShipmentType(0) = “1” Then

Call UpdateOrderDoc

End If

???

Thanks!

Subject: RE: Weired happening in LS code

No – but since there is no difference between the assignment operator and the equivalency operator, I wouldn’t trust the code in your original posting as far as I could throw it. The If statement makes it unambiguously an equivalency check (legal), while it is possible to interpret the code you posted as an attempt to assign a value to an indexed member of the values array of a NotesItem (illegal).

Subject: RE: Weired happening in LS code

While I personally prefer to always use the braces, there really should be no difference at all.