LOTUSSCRIPT 言語
例 3' Declare iVer and kVer as Integer variables.Note that ' the phrase As Integer must be repeated to declare both ' variables as Integer. Dim iVer As Integer, kVer As Integer ' Declare nVer as an Integer variable. ' The declared type of mVer is Variant, the default ' data type, because no data type is declared for mVer: ' there is no As type phrase for mVer, and no data type ' suffix attached to mVer. Dim mVer, nVer As Integer Print TypeName(mVer), TypeName(nVer%) ' Prints EMPTY INTEGER 例 4' Declare marCell and perDue as Integer variables. ' The phrase As Integer declares marCell as an Integer ' variable.The data type suffix % declares perDue as an ' Integer variable. Dim marCell As Integer, perDue% Print TypeName(marCell), TypeName(perDue%) ' Prints INTEGER INTEGER 例 5Dim marCell% As Integer ' Error, because the Dim statement attempts to declare ' the Integer variable marCell using both the data type ' suffix character for Integer, and the data type name ' Integer.The declaration should include one or the ' other, but not both. 例 6' A data type suffix character is optional in references to a ' declared variable. ' Declare marCell as an Integer variable. Dim marCell As Integer ' Use the data type suffix character in a reference to marCell. marCell% = 1 ' Refer to marCell without using the suffix character. Print marCell ' Prints 1 例 7' Declare marCell as an Integer variable. Dim marCell As Integer ' Assign integer value to marCell. marCell% = 1 Print marCell$ ' Error, because the Print statement refers to marCell ' using the data type suffix character $ for a String ' variable, but marCell was declared as an Integer. 例 8Dim db As New NotesDatabase ("Server003", "discuss.nsf") この Dim objRef As New prodClass(argList) ステートメントは、Lotus Notes/Domino の NotesDatabase クラスへのオブジェクト参照を宣言し、そのインスタンスを作成します。NotesDomino のオブジェクトを作成する Dim ステートメントには、サーバー名とデータベースパス名という 2 つの文字列引数が必要です。
関連項目