Manual Pages for UNIX Darwin command on man Tk_Uid
MyWebUniversity

Manual Pages for UNIX Darwin command on man Tk_Uid

TkGetUid(3) Tk Library Procedures TkGetUid(3)

NAME

TkGetUid, TkUid - convert from string to unique identifier

SYNOPSIS

##iinncclluuddee <>

TkUid TTkkGGeettUUiidd(string) AARRGGUUMMEENNTTSS

char *string (in) String for which the corre-

sponding unique identifier is desired.

DESCRIPTION

TTkkGGeettUUiidd returns the unique identifier corresponding to string. Unique identifiers are similar to atoms in Lisp, and are used in Tk to speed up comparisons and searches. A unique identifier (type TkUid) is a string pointer and may be used anywhere that a variable of type ``char *'' could be used. However, there is guaranteed to be exactly one unique identifier for any given string value. If TTkkGGeettUUiidd is called twice, once with string a and once with string b, and if a and b have the same string value (strcmp(a, b) == 0), then TTkkGGeettUUiidd will return exactly the same TkUid value for each call (TkGetUid(a) ==

TkGetUid(b)). This means that variables of type TkUid may be com-

pared directly (x == y) without having to call ssttrrccmmpp. In addition, the return value from TTkkGGeettUUiidd will have the same string value as its argument (strcmp(TkGetUid(a), a) == 0). KKEEYYWWOORRDDSS atom, unique identifier Tk TkGetUid(3)




Contact us      |      About us      |      Term of use      |       Copyright © 2000-2019 MyWebUniversity.com ™