QB64.com

QB64 is a modern extended BASIC programming language that retains QBasic/QuickBASIC 4.5 compatibility and compiles native binaries for Windows, Linux, and macOS.

The DEFSTR statement defines all variables with names starting with the specified letter (or letter range) AS STRING variables instead of the SINGLE type default.

Legacy Support

Syntax

DEFSTR letter[-range], letter2[-range2], […]

Description

QBasic

Example(s)


DEFSTR A, F-H, M

'With the above, all variables with names starting with A, F, G, H and M
'will be of type STRING, unless they have a type suffix
'indicating another type or they are dimensioned differently

See Also