Default data type value

Recently I needed to find out whether a guid variable contains the default value ({0000…}). Indeed, I could use a newly initialized variable or convert a string representation to guid type using str2guid(), however it is always good to hide such a logic to a separate method. I didn’t manage to find any standard method, hence I implemented my own one.

Nevertheless, I found the solution today. Default values for particular types can be obtain by the following methods in the Global class:

static anytype nullValue(anytype a)
static anytype nullValueBaseType(Types baseType, boolean enumAsInt = false)