Number vs. Double

Seems like a real newbie question but I can’t find a proper answer in the Language Reference.
I want a to define a Constant with a Double value but the only ‘close’ Constant type is a Number am I going to be able to use a Number to hold any Double value?


const kInt = 5 // Integer
const kDbl = 5. // Double

A constant is a compile-time construct. It gets replaced in your code with the value you assign to it.

const kDbl = 5.5 dim d as double = kDbl
compiles as

dim d as double = 5.5
The type is there as a hint to the compiler and doesn’t need to be as specific as Integer vs. Double. The important distinction is number vs. string.