Copyright (c) Hyperion Entertainment and contributors.
AmiWest Lesson 2: Difference between revisions
Jump to navigation
Jump to search
Content deleted Content added
Steven Solie (talk | contribs) |
Steven Solie (talk | contribs) |
||
Line 13: | Line 13: | ||
| int64 || n/a || int64_t || int64_t |
| int64 || n/a || int64_t || int64_t |
||
|- |
|- |
||
| uint32 || ULONG || uint32_t || uint32_t |
| uint32 || ULONG or LONGBITS or CPTR || uint32_t || uint32_t |
||
|- |
|- |
||
| int32 || LONG || int32_t || int32_t |
| int32 || LONG || int32_t || int32_t |
||
|- |
|- |
||
| uint16 || UWORD || uint16_t || uint16_t |
| uint16 || UWORD or WORDBITS or USHORT or UCOUNT or RPTR || uint16_t || uint16_t |
||
|- |
|- |
||
| int16 || WORD || int16_t || int16_t |
| int16 || WORD or SHORT or COUNT || int16_t || int16_t |
||
|- |
|||
| uint8 || UBYTE or BYTEBITS || char or unsigned char || unsigned char |
|||
|- |
|||
| int8 || BYTE || signed char || signed char |
|||
|- |
|||
| STRPTR || n/a || char* || char* |
|||
|- |
|||
| CONST STRPTR || n/a || const char* || const char* |
|||
|} |
|} |
Revision as of 02:17, 3 October 2012
AmiWest Lesson 1: Fundamentals
Basic Types
It is very important to under at least the basic types when programming. The following table summarizes the basic types used in AmigaOS as compared to standard C and C++ types:
Current Type | Deprecated Type | C | C++ |
---|---|---|---|
uint64 | n/a | uint64_t | uint64_t |
int64 | n/a | int64_t | int64_t |
uint32 | ULONG or LONGBITS or CPTR | uint32_t | uint32_t |
int32 | LONG | int32_t | int32_t |
uint16 | UWORD or WORDBITS or USHORT or UCOUNT or RPTR | uint16_t | uint16_t |
int16 | WORD or SHORT or COUNT | int16_t | int16_t |
uint8 | UBYTE or BYTEBITS | char or unsigned char | unsigned char |
int8 | BYTE | signed char | signed char |
STRPTR | n/a | char* | char* |
CONST STRPTR | n/a | const char* | const char* |