Repository navigation
Fb Uniqueid
Home › Intrinsic Defines › FB_UNIQUEID
Intrinsic define (macro) performed by the compiler.
__FB_UNIQUEID__( stack-id )stack-id
Gets the identifier at the top of stack identified by stack-id (the size of the stack is not modified).
(__FB_UNIQUEID_PUSH__ allows to push a new unique identifier on to the stack, and __FB_UNIQUEID_POP__ allows to pop an identifier off of the stack)
Note:
- The 'stack-id' name itself is a separate namespace from all other symbols. - The stack can only contain 'unique identifiers'. - 'unique identifier' is a name of an fb symbol that is unique to the module, so does not conflict or shadow other symbol names ('unique identifier' will have the form 'LT_xxxx' as a name so it might not be completely unique). - fb uses the form 'LT_xxxx' internally for labels, symbols, temp variables, etc (so should avoid naming symbols of this form in any program).
__FB_UNIQUEID__ simply expands to unquoted text. So the name, for example 'Lt_0004', can be used wherever an fb symbol is required (a variable, procedure name, type name, etc.).
__FB_UNIQUEID__ returns an unquoted empty string when the stack is empty or has never been filled.
- New to FreeBASIC
__FB_UNIQUEID_PUSH__( stk )
#print __FB_UNIQUEID__( stk )
__FB_UNIQUEID_PUSH__( stk )
#print __FB_UNIQUEID__( stk )
__FB_UNIQUEID_PUSH__( stk )
#print __FB_UNIQUEID__( stk )
__FB_UNIQUEID_POP__( stk )
#print __FB_UNIQUEID__( stk )
__FB_UNIQUEID_POP__( stk )
#print __FB_UNIQUEID__( stk )
__FB_UNIQUEID_POP__( stk )
/' Compiler output example:
Lt_0006
Lt_0007
Lt_0008
Lt_0007
Lt_0006
'/See also __FB_UNIQUEID_PUSH__ and __FB_UNIQUEID_POP__ examples.
Category: Intrinsic Defines
Kind: keyword
Reproduced from the FreeBASIC Wiki Manual under the GNU Free Documentation License 1.3 — with no Invariant Sections, no Front-Cover Texts and no Back-Cover Texts. Copyright © the FreeBASIC project and wiki contributors. See License.
tiko-lang · Home · Feature Index · Keyword Index · License
FreeBASIC manual pages reproduced under the GNU FDL 1.3.
- Generics
- Interfaces
- For Each
- Iterators
- Tuples
- Array Results
- Defer
- Lambdas
- Block Strings
- String Slices
- Embed
- Typed Variadics
- C Header Import
- Foreign Library Linking
- UString
- Fixed-Width Types
- Nullptr
- String Library
- Format
- Array
- Map
- Set
- LinkedList
- OrderedMap
- OrderedSet
- Sorting
- Optional
- Result
- Smart Pointers
- Date and Time (Chrono)
- Filesystem
- File Streams
- Config (INI and TOML)
- Codec
- Hash
- UUID
- OS
- Process
- Net
- HTTP and TLS
- Math Library
- Finance
- Logging
- Terminal TUI Library
- PsControls
- tkControls
- sys/win
- Goroutines and Channels
- LLVM Backend
- tiko build
- TIKO_COMPILER
- Variable Declarations
- Standard Data Types
- User Defined Types
- Procedures
- Operators
- Control Flow Statements
- Converting Data Types
- Array Functions
- String Functions
- Mathematical Functions
- Bit Manipulation
- Date and Time Functions
- File I/O Functions
- Console Functions
- User Input (Runtime Library)
- User Input Functions (Graphics Library)
- Screen Functions
- 2D Drawing Functions
- Graphics Library Reference
- Graphics Keyword List
- Memory Functions
- Threading Support Functions
- Error Handling Functions
- Operating System Functions
- Preprocessor
- Intrinsic Defines
- Miscellaneous Keywords
- Modularizing