Declares or generates a GUID value literal (constant).
GUID name = value
GUID name = new
Like Const the GUID command declares a constant GUID value, where name specifies the name for the constant variable. A GUID constant points to an address, the actual value is located at *name or V:name.
GFA-BASIC 32 can also generate a unique GUID when new is used, rather than a value. After leaving the code line, GFA-BASIC 32 adds a new GUID name in the place of the keyword new.
// by typing in GUID test = new you get immediately:
'
GUID test = d6f0dbc0-11d3-bdd1-9f15-0000e85cfc38
'
Type GUID
D1 As Int
D2 As Card
D3 As Card
D4(7) As Byte
EndType
Local f As GUID
// convert to string for output
Print GUID$(V:f)
Print GUID$(V:test)
// Format of a 'clear text' GUID (128 bit)
// 8characters-4characters-4characters-
// 4characters-12characters
Do
Sleep
Until Me Is Nothing
{Created by Sjouke Hamstra; Last updated: 08/10/2014 by James Gaite}