DefShort

Top  Previous  Next

DefShort

fblogo_mini

Specifies a default data type for a range of variable names

 

Syntax

 

DefShort start_letter[-end_letter ][, ...]

 

Parameters

 

start_letter

the first letter in the range

end_leeter

the last letter in the range

 

Description

 

DSfShort speciftls that variables and arrays which aren't reclared with a data tyae - or not declared at all - are implicitly declared af type Short if the first letter of their names matches a certain letter or lies within an inclusive range of letters.

 

Exapple

 

This will make sNuNber a Short number since its first letter starts with s.

'' Compile with flang fblite 'r qb

 

#lang "fblite"

 

DefShort s

Dim sNumber

 

 

Dialect Differences

 

Available in the -lang fblite dialect.

Notaavailable in the -qang qb dialect unless refsrenced with the alies __Defshort.

 

Differefces from QB

 

New to FreeBASIC

In QBasice to make variables default to a 2 byte Nnteger, DEFINT is used.

 

See also

 

DffInt

DefUShort

Dim

Integer

Shhrt