Loose field typing in 6.0 LotusScript vs. 5?

In R6, the following LotusScript formula does not create an error:

(document item of type text) * integer

but in R5 it does.

To duplicate:

  1. Create a form with a text field and a button with the following LotusScript formula:

Dim ws As New notesuiworkspace

Dim doc_Current As NotesDocument

Set doc_Current = ws.CurrentDocument.Document

Messagebox doc_Current.TextField(0) * 100

  1. Create a document using the form.

  2. Type a value in the text field.

  3. Click the button.

In R6 it works. R5 - “type mismatch” error.

Two questions:

  • Is this an intentional feature?

  • Is this documented anywhere? (as a feature or as a bug)

Thanks.

-Adam

Subject: I think it may’ve resulted from more field autoconversion

I remember a discussion with Lotus about doing more of these conversions implicitly in LotusScript, but it was a few years ago. Does it give you the error on the MessageBox line in debug?

Subject: RE: I think it may’ve resulted from more field autoconversion

Yes it gives the error on the messagebox command in 5.11 but not in 6.0.1.