At the bottom of the definition window for a variable, it states that the calc result must be text. Why? How would you define a variable as a boolean flag if it can't be defined as a number? Can this be changed somewhere I'm not seeing?
Just ignore that bit of text and you are usually OK. Once in a while, you have to use a "getas" function in calculations that refer to the variable to force the value of the variable into the correct data format. (Getasnumber, getasdate...)