Quartus Forth Manual

Table of Contents - Quartus Forth Home Page - How to Register

C Typedefs

In 3Com's documentation, arguments for system functions are described using C typedefs. Many of these typedefs refer to exactly the same underlying data type. The table below lists all of the typedefs 3Com defines, with their representation and examples of those values in Quartus Forth.

C typedef

Representing

Example values in Quartus Forth

Quartus Forth Stack Diagram Notation

( argument -- result )

Fixed Size Data Types

typedef char SByte
typedef char Char

8 bits {-128..127}

-128

char A

( name[>byte] -- name )

typedef unsigned char Byte
typedef unsigned char UChar

8 bits {0..255} 64 ( name[>byte] -- name )
typedef unsigned char Boolean 8 bits {0=false, non-zero=true}

TRUE

( name? )

typedef unsigned short UInt
typedef unsigned short UInt16
typedef unsigned short Word
typedef unsigned short UShort

16 bits {0..65535} 41288 ( u )

typedef short SWord
typedef short Short
typedef short Int16
typedef short Int
typedef short Err

16 bits {-32768..32767} -15000 ( n )

typedef unsigned long UInt32
typedef unsigned long DWord
typedef unsigned long ULong

32 bits {0..4294967295} 8675309. ( u. )
typedef DWord LocalID 32 bits representing a database ID returned by DmFindDatabase, DmGetDatabase, etc. ( localID. )

typedef long Long
typedef long SDWord
typedef long Int32

32 bits {-2147483648..2147483647}
-12345678. ( d. )
Pointer Types

typedef void* VoidPtr
typedef VoidPtr* VoidHand
typedef SByte* SBytePtr
typedef Byte* BytePtr
typedef SWord* SWordPtr
typedef Word* WordPtr
typedef unsigned short* UInt16Ptr
typedef SDWord* SDWordPtr
typedef DWord* DWordPtr
typedef Boolean* BooleanPtr
typedef Char* CharPtr
typedef UChar* UCharPtr
typedef Short* ShortPtr
typedef UShort* UShortPtr
typedef Int* IntPtr
typedef UInt* UIntPtr
typedef Long* LongPtr
typedef ULong* ULongPtr
typedef char* Ptr
typedef Ptr* Handle

32 bits representing an address in memory

here >abs


32. MemHandleNew

( &name. )
typedef Long (*ProcPtr)() 32 bits representing the address of a function ' type xt>abs ( &funcname. )

Table of Contents - Quartus Forth Home Page
© 1998, 1999 Neal Bridges. All rights reserved.