Joy Online Manual
NAME |
objc:encode - Encode a Joy type definition |
SYNOPSIS |
objc:encode ?-skipqualifiers? type
DESCRIPTION |
Encodes a Joy type definition analogous to the Objective-C directive @encode(type). If -skipqualifiers is specified, the resulting encoding will be stripped of any leading type qualifier (such as field names), to guarantee that the first character is a type specifier.
The following codes are returned: |
type | Code | |
char | c | |
int | i | |
short | s | |
long | l | |
longlong | q | |
uchar | C | |
uint | I | |
ushort | S | |
ulong | L | |
ulonglong | Q | |
float | f | |
double | d | |
void | v | |
STR | * | |
id | @ | |
Class | # | |
SEL | : |
{t n} | {n t} | (array) | |
{struct ...} | {<name>=...} | ||
{bitfield n} | b n | ||
{t *} | ^t | (pointer) | |
(unknown) | ? |
(where t is any type (respectively its encoding) and n is an integer) |
EXAMPLE |
joy> objc:encode NSRect
{?={?=ff}{?=ff}}
(a struct of unknown name containing two structs containing two floats each). |
SEE ALSO |
objc:decode
objc:expandType
objc:typedef
KEYWORDS |
encoding, type |
Index |