LOTUSSCRIPT 言語


例:Deftype ステートメント
DefInt a-z

' x is declared explicitly, with no type.
Dim x
Print TypeName(x) ' Output:INTEGER
' N is declared explicitly, with no type.
Dim N
Print TypeName(N) ' Output:INTEGER
' y is declared explicitly, with the String type.
' The specified type overrules the DefInt statement.
Dim y As String
Print TypeName(y) ' Output:STRING
' b is declared implicitly, with the String type.
' The suffix character $ overrules the DefInt statement.
b$ = "Rebar"
Print TypeName(b$) ' Output:STRING
' sNum is declared implicitly, which makes it Integer by
' default because DefInt a-z is in effect.
sNum = 17.6
Print TypeName(sNum), sNum ' Output:INTEGER 18
' because LotusScript rounds when
' converting to type Integer.

関連項目