<< Click to Display Table of Contents >> Navigation: ThinBASIC Core Language > Data types and variables > GUID variables |
GUID data type
GUID variables are a special form of 16-byte string that are used to contain a 128-bit Globally Unique Identifier (GUID), primarily for use with COM Objects.
A GUID variable is assigned a value with the GUID$ function, or with a string equate, and that value usually remains constant throughout the script execution. The GUID variable is typically used only as a parameter, rather than as a term in an expression.
Example of a text GUID form: {00000000-0000-0000-0000-000000000000}
Important
When passing a GUID variable to function, it is currently necessary to specify the parameter as STRING. ThinBASIC will perform then necessary conversions.
Function DisplayGuid(someGuid As string) As String
MsgBox "The guid is: " & GUIDTXT$(someGuid)
End Function
Dim myGuid As Guid = Guid$
DisplayGuid(myGuid)