Search code examples
lotus-dominolotusscriptlotus

What is this Ampersand tailed to variable name


In some tutorials I find variables used with ampersand at the end of their names like with boxType& here:

%Include "lsconst.lss"
Dim boxType As Long, answer As Integer

boxType& = MB_YESNO + MB_ICONQUESTION

answer% = MessageBox("Do you want to continue?", boxType&, _ 
 "Continue?")

I am learning Lotus Script while developing, so I seem to have missed some basics! I would like to know what this ampersand in this context mean.


Solution

  • This a a so called "type suffix" and tells you, that boxType is of Type Long and answer is of type Integer. Usually you use this instead of declaring variables explicitly. Or you use it, to "see" in the variable, what type it is. Read this link or your designer Help (Topic: About data types (LotusScript Language) ) to find out more about this.

    Here are the prefixes from the linked document:

    • Integer = %
    • Long = &
    • Single = !
    • Double = #
    • Currency = @
    • String = $