![]() |
BlitzMax Extended
0.8.19
Pushing Blitz to the Max.
|
Introduces most used data types. More...
#include <float.h>#include <limits.h>#include <stdint.h>#include "_common.h"Go to the source code of this file.
Data Structures | |
| struct | BBTypeKeyInfo |
| Contains useful information about each type key. More... | |
Macros | |
| #define | BBBYTE_MIN |
| The minimum value a variable of type BBByte can hold. | |
| #define | BBBYTE_MAX |
| The maximum value a variable of type BBByte can hold. | |
| #define | BBSHORT_MIN |
| The minimum value a variable of type BBShort can hold. | |
| #define | BBSHORT_MAX |
| The maximum value a variable of type BBShort can hold. | |
| #define | BBINT_MIN |
| The minimum value a variable of type BBInt can hold. | |
| #define | BBINT_MAX |
| The maximum value a variable of type BBInt can hold. | |
| #define | BBLONG_MIN |
| The minimum value a variable of type BBLong can hold. | |
| #define | BBLONG_MAX |
| The maximum value a variable of type BBLong can hold. | |
| #define | BBFLOAT_MIN |
| The minimum value a variable of type BBFloat can hold. | |
| #define | BBFLOAT_MAX |
| The maximum value a variable of type BBFloat can hold. | |
| #define | BBDOUBLE_MIN |
| The minimum value a variable of type BBDouble can hold. | |
| #define | BBDOUBLE_MAX |
| The maximum value a variable of type BBDouble can hold. | |
| #define | BBCHAR_MIN |
| The minimum value a variable of type BBChar can hold. | |
| #define | BBCHAR_MAX |
| The maximum value a variable of type BBChar can hold. | |
| #define | BBSIZE_MIN |
| The minimal value a variable of type BBSize can hold. | |
| #define | BBSIZE_MAX |
| The maximum value a variable of type BBSize SHOULD store. | |
| #define | BBTYPEKEY_ISVALID(key) |
| Checks if a type key is valid. | |
| #define | BBTYPEKEY_ISNUMERIC(key) |
| Checks if a type key identifies a numeric variable. | |
| #define | BBTYPEKEY_ISPRIMITIVE(key) |
| Checks if a type key identifies a primitive data type. | |
| #define | BBTYPEKEY_ISCOMPLEX(key) |
| Checks if a type key identifies a complex data type. | |
| #define | BBTYPETAG_KEY(tag) |
Gets the corresponding BBTypeKey for a type tag. | |
Typedefs | |
| typedef unsigned char | BBByte |
| The BlitzMax "Byte" data type. | |
| typedef unsigned short | BBShort |
| The BlitzMax "Short" data type. | |
| typedef signed int | BBInt |
| The BlitzMax "Int" data type. | |
| typedef BBInt64 | BBLong |
| The BlitzMax "Long" data type. | |
| typedef float | BBFloat |
| The BlitzMax "Float" data type. | |
| typedef double | BBDouble |
| The BlitzMax "Double" data type. | |
| typedef BBUInt16 | BBChar |
| The BlitzMax internal character type. | |
Enumerations | |
| enum | BBBool |
| Boolean data type. More... | |
| enum | BBTypeKey { BBTYPEKEY_BYTE, BBTYPEKEY_SHORT, BBTYPEKEY_INT, BBTYPEKEY_LONG, BBTYPEKEY_FLOAT, BBTYPEKEY_DOUBLE, BBTYPEKEY_POINTER, BBTYPEKEY_VOID, BBTYPEKEY_FUNCTION, BBTYPEKEY_OBJECT, BBTYPEKEY_STRING, BBTYPEKEY_ARRAY } |
| EXTENDED ///. More... | |
Variables | |
| const BBTypeKeyInfo | bbTypeKeyInfo [] |
| Stores the TypeKey information for all BlitzMax data types. | |
Introduces most used data types.
BlitzMax has two kinds of data types: Primitive and complex types.
Primitive types store one value or a pointer to one. They include: BBByte, BBShort, BBInt, BBLong, BBFloat, BBDouble and BBChar
Complex data types are BlitzMax objects, consisting of a C struct to store the data and a BBClass that defines the functionality. They include: BBObject, BBString, BBArray and every user-defined class
| #define BBSIZE_MAX |
The maximum value a variable of type BBSize SHOULD store.
Since the BlitzMax language aswell as it's runtime operate mostly on a signed integer basis, values stored in variables of this data type should not exceed BBINT_MAX. Otherwise there could be problems with legacy code.
| #define BBTYPEKEY_ISCOMPLEX | ( | key | ) |
Checks if a type key identifies a complex data type.
The following data types are considered to be "complex": BBObject, BBString and BBArray
Therefore the following type keys will check positive for complex data type: BBTYPEKEY_OBJECT, BBTYPEKEY_STRING and BBTYPEKEY_ARRAY
| key | The type key to check |
| true | If the key identifies a complex data type |
| false | If the does not identify a valid complex variable |
Referenced by bbArrayEndsWith(), bbArrayStartsWith(), and bbObjectClone().
| #define BBTYPEKEY_ISNUMERIC | ( | key | ) |
Checks if a type key identifies a numeric variable.
The following data types are considered to be "numeric": BBByte, BBShort and BBInt, BBLong, BBFloat and BBDouble
Therefore the following type keys will check positive for complex data type: BBTYPEKEY_BYTE, BBTYPEKEY_SHORT and BBTYPEKEY_INT, BBTYPEKEY_LONG, BBTYPEKEY_FLOAT and BBTYPEKEY_DOUBLE
| key | The type key to check |
| true | If the key identifies a numeric variable |
| false | If the does not identify a valid numeric variable |
| #define BBTYPEKEY_ISPRIMITIVE | ( | key | ) |
Checks if a type key identifies a primitive data type.
The following data types are considered to be "primitive": BBByte, BBShort, BBInt, BBLong, BBFloat, BBDouble, void*, void and (*)
Therefore the following type keys will check positive for primitive data type: BBTYPEKEY_BYTE, BBTYPEKEY_SHORT and BBTYPEKEY_INT, BBTYPEKEY_LONG, BBTYPEKEY_FLOAT, BBTYPEKEY_DOUBLE, BBTYPEKEY_POINTER, BBTYPEKEY_VOID, BBTYPEKEY_FUNCTION
| key | The type key to check |
| true | If the key identifies a primitive data type |
| false | If the does not identify a valid primitive variable |
Referenced by bbArrayClone().
| #define BBTYPEKEY_ISVALID | ( | key | ) |
Checks if a type key is valid.
All known keys are considered to be valid.
| key | The type key to check as an integer |
| true | If the key is valid |
| false | If the key is not valid |
| #define BBTYPETAG_KEY | ( | tag | ) |
Gets the corresponding BBTypeKey for a type tag.
| tag | The type tag as a null-terminated string |
Referenced by bbArrayClone(), bbArrayCompare(), bbArrayEndsWith(), bbArrayFindDouble(), bbArrayFindFloat(), bbArrayFindInt(), bbArrayFindLong(), bbArrayFindObject(), bbArrayFindString(), bbArrayNew1D(), bbArrayRotate(), bbArrayStartsWith(), bbArrayToString(), and bbObjectClone().
| typedef unsigned char BBByte |
The BlitzMax "Byte" data type.
| typedef BBUInt16 BBChar |
The BlitzMax internal character type.
Represents a single UCS-2 character code.
| typedef BBInt64 BBLong |
The BlitzMax "Long" data type.
| typedef unsigned short BBShort |
The BlitzMax "Short" data type.
| enum BBBool |
Boolean data type.
Although BlitzMax does not have a designated boolean data type as of now, this is useful for improving readability.
| enum BBTypeKey |
EXTENDED ///.
| const BBTypeKeyInfo bbTypeKeyInfo[] |
Stores the TypeKey information for all BlitzMax data types.
1.8.1.1