AS: Difference between revisions
Jump to navigation
Jump to search
Navigation:
Main Page with Articles and Tutorials
Keyword Reference - Alphabetical
Keyword Reference - By usage
Report a broken link
No edit summary Tags: Undo Reverted |
No edit summary Tags: Manual revert Reverted |
||
Line 1: | Line 1: | ||
The [[AS]] keyword defines a variable data [[type]]. | The [[AS]] keyword defines a variable data [[type]]. | ||
Line 26: | Line 26: | ||
{{PageSeeAlso}} | {{PageSeeAlso}} | ||
* [[DIM]], [[REDIM]] | * [[DIM]], [[REDIM]] | ||
* [[_DEFINE]] | * [[_DEFINE]] | ||
* [[BYVAL]], [[TYPE]] | * [[BYVAL]], [[TYPE]] | ||
* [[Variable Types]] | * [[Variable Types]] |
Revision as of 23:00, 22 January 2023
The AS keyword defines a variable data type.
Description
- AS defines the variable or array type AS _BIT, _BYTE, INTEGER, LONG, _INTEGER64, SINGLE, DOUBLE, _FLOAT or STRING.
- Specifies a variable's type in a declarative statement or parameter list using:
Details
- Specifies a parameter variable's type in a SUB or FUNCTION procedure. Cannot be used to define a function's type
- Specifies an element's type in a user-defined data TYPE.
- Assigns a file number to a file or device in an OPEN statement.
- Specifies a field name in a random-access record (see FIELD)
- Specifies a new file name when you rename a file (see NAME)
- NOTE: Many QBasic keywords can be used as variable names if they are created as STRINGs using the suffix $. You cannot use them without the suffix, use a numerical suffix or use DIM, REDIM, _DEFINE, BYVAL or TYPE variable AS statements.
See also