; NormalizeUuid Example ; --------------------- ; Requires Extended mode. ; Object ids arrive in mixed styles from old save files and other ; tools. NormalizeUuid converts every accepted form to canonical ; lowercase dashed (D) text, so ids compare as plain strings. n_form$="00112233445566778899AABBCCDDEEFF" braced$="{00112233-4455-6677-8899-AABBCCDDEEFF}" Print "N form uppercase: "+n_form Print " normalized -> "+NormalizeUuid(n_form) Print "" Print "Braced uppercase: "+braced Print " normalized -> "+NormalizeUuid(braced) Print "" ; Both normalize to the same string, so they can be compared Print "Same id after normalizing: "+(NormalizeUuid(n_form)=NormalizeUuid(braced)) Print "" ; Invalid text normalizes to an empty string Print "NormalizeUuid('not-a-uuid') = '"+NormalizeUuid("not-a-uuid")+"' (empty = invalid)" Print "" Print "Press any key to close the example" WaitKey End