|
BlitzMax Extended
0.8.10
Pushing Blitz to the Max.
|
Introduces most used data types. More...
#include <float.h>#include <limits.h>#include "_common.h"Go to the source code of this file.
Data Structures | |
| struct | BBTypeKeyInfo |
| Contains useful information about each type key. More... | |
Defines | |
| #define | BBBYTE_MIN ((BBByte) 0x00) |
| The minimum value a variable of type BBByte can hold. | |
| #define | BBBYTE_MAX ((BBByte) 0xff) |
| The maximum value a variable of type BBByte can hold. | |
| #define | BBSHORT_MIN ((BBShort) 0x0000) |
| The minimum value a variable of type BBShort can hold. | |
| #define | BBSHORT_MAX ((BBShort) 0xffff) |
| The maximum value a variable of type BBShort can hold. | |
| #define | BBINT_MIN INT_MIN |
| The minimum value a variable of type BBInt can hold. | |
| #define | BBINT_MAX INT_MAX |
| The maximum value a variable of type BBInt can hold. | |
| #define | BBLONG_MIN ((BBLong) 0x800000000000000L) |
| The minimum value a variable of type BBLong can hold. | |
| #define | BBLONG_MAX ((BBLong) 0x7ffffffffffffffL) |
| The maximum value a variable of type BBLong can hold. | |
| #define | BBFLOAT_MIN ((BBFloat) -FLT_MAX) |
| The minimum value a variable of type BBFloat can hold. | |
| #define | BBFLOAT_MAX ((BBFloat) FLT_MAX) |
| The maximum value a variable of type BBFloat can hold. | |
| #define | BBDOUBLE_MIN ((BBDouble) -DBL_MAX) |
| The minimum value a variable of type BBDouble can hold. | |
| #define | BBDOUBLE_MAX ((BBDouble) DBL_MAX) |
| The maximum value a variable of type BBDouble can hold. | |
| #define | BBCHAR_MIN ((BBChar) 0x0000) |
| The minimum value a variable of type BBChar can hold. | |
| #define | BBCHAR_MAX ((BBChar) 0xffff) |
| The maximum value a variable of type BBChar can hold. | |
| #define | BBSIZE_MIN ((BBSIZE_MIN)0) |
| The minimal value a variable of type BBSize can hold. | |
| #define | BBTYPEKEY_ISVALID(key) ((key) >= BBTYPEKEY_VOID && (key) <= BBTYPEKEY_ARRAY) |
| Checks if a type key is valid. | |
| #define | BBTYPETAG_KEY(tag) bbToTypeKeyData[(tag)[0]] |
| 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 unsigned short | 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 } |
| An integer identifier mapping a type tag. More... | |
Variables | |
| const BBTypeKeyInfo | bbTypeKeyInfo [] |
| Stores the TypeKey information for all known 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 BBTYPEKEY_ISVALID | ( | key | ) | ((key) >= BBTYPEKEY_VOID && (key) <= BBTYPEKEY_ARRAY) |
Checks if a type key is valid.
All known keys are considered to be valid.
| key | The type key to check as an integer |
| BBTRUE | if the key is valid |
| BBFALSE | if the key is not valid |
| #define BBTYPETAG_KEY | ( | tag | ) | bbToTypeKeyData[(tag)[0]] |
Gets the corresponding BBTypeKey for a type tag.
| tag | The type tag as a null-terminated string |
Referenced by bbArrayClone(), bbArrayCompare(), bbArrayEquals(), bbArrayFindDouble(), bbArrayFindFloat(), bbArrayFindInt(), bbArrayFindLong(), bbArrayFindObject(), bbArrayFindString(), bbArrayFromData(), bbArrayNew1D(), bbArrayReverse(), bbArrayRotate(), and bbArrayToString().
| typedef unsigned char BBByte |
The BlitzMax "Byte" data type.
| typedef unsigned short 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 |
An integer identifier mapping a type tag.
BlitzMax uses a system of null-terminated strings internally to inform about the type of an argument, for example in the array functions.
Sometimes it can be benefiticial to execution speed to just look up information about a data type in an array instead of checking by hand. The problem is, that by using the first letters of the type tag string as the array's keys would waste memory without need. Type keys solve this problem.
By mapping type tags to type keys you can create arrays containing extra information for each type without wasting precious memory.
| const BBTypeKeyInfo bbTypeKeyInfo[] |
Stores the TypeKey information for all known BlitzMax data types.
1.8.0