Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

GUIDs in Fortran

David_DiLaura1
418 Views
Is there a convenient way to handle GUIDs in Fortran? I need to read a binary file that contains GUIDs as identifiers. The only manipulation I need to do inside my application is to compare them and know when two objects have been tagged with the same GUID.

David
0 Kudos
1 Reply
Jugoslav_Dujic
Valued Contributor II
418 Views
Is there a convenient way to handle GUIDs in Fortran? I need to read a binary file that contains GUIDs as identifiers. The only manipulation I need to do inside my application is to compare them and know when two objects have been tagged with the same GUID.

There's already defined TYPE(T_GUID) in ifwinty. If I recall correctly, you can test two TYPEs for equality (== or .EQ.), and even if not, you can define your own INTERFACE OPERATOR(.EQ.) (as well as other operators, such as < or >, which can be useful if you need sorting/indexing/searching facilities).
0 Kudos
Reply