[futurebasic] Re: [FB] Beginners: Errors

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : January 2010 : Group Archive : Group : All Groups

From: Brian Stevens <bstevens33@...>
Date: Mon, 18 Jan 2010 20:58:55 -0700
On Jan 18, 2010, at 5:12 PM, Emmett wrote:

> In this particular program the Author states that variable is a  
> "signed short integer variable"

A signed short integer variable can be defined:

dim as short   aVar

dim as int     aVar

dim as SInt16  aVar

The first two are currently two-byte variables but are subject to  
compiler/machine interpretation. An SInt16 specifically requests a  
signed 16 bit ( i.e. two byte ) integer. If the number of bytes is  
important, SInt16 is not subject to interpretation.

You mentioned using a 'long'. That is a synonym for a 4-byte signed  
integer. It can also be requested as a SInt32. Sometimes a sign bit is  
unimportant( obviously only situations where there cannot be a  
negative number ) and in those cases an unsigned integer can be  
requested (i.e. UInt32  - is a 4 byte unsigned integer, UInt16  - is a  
2 byte unsigned integer ). FB also provides the ability to create 64- 
bit variables.

Brian S