11-02-2008, 03:41 AM
Hi All,
I have many user-defined functions of the form:
Function NameRectifier
etc, etc, going on for even up to potentially >100 entries
I use these functions to link computer names to adjacent phone numbers, ip addresses, etc and to swap technical names scraped from document metadata into common names, etc.
They work perfectly fine but I was just wondering if there was a more elegant or easier to maintain or perhaps faster-executing way to organize these.
I figure there is probably an xml answer but that may not run as fast as just having them all in a long function within QM rather than an external file. Should I be creating a multi-dimensional array? Anyway, I have learned so much about about programming style just by customizing Gintaras' and other's many examples in the Forum so I thought I might ask.
Stuart
I have many user-defined functions of the form:
Function NameRectifier
function str&UserLogin str&UserLastName str&UserFullName
,
if UserLogin = "jkj1";
,UserLastName= "Jones"; err ret
,UserFullName= "Jonathan K Jones"; err ret
if UserLogin = "sps45";
,UserLastName= "Smith"; err ret
,UserFullName= "Sam P Smith"; err ret
,
if UserLogin = "";
,UserLastName= ""; err ret
,UserFullName= ""; err ret
,
if UserLogin = "";
,UserLastName= ""; err ret
,UserFullName= ""; err ret
etc, etc, going on for even up to potentially >100 entries
I use these functions to link computer names to adjacent phone numbers, ip addresses, etc and to swap technical names scraped from document metadata into common names, etc.
They work perfectly fine but I was just wondering if there was a more elegant or easier to maintain or perhaps faster-executing way to organize these.
I figure there is probably an xml answer but that may not run as fast as just having them all in a long function within QM rather than an external file. Should I be creating a multi-dimensional array? Anyway, I have learned so much about about programming style just by customizing Gintaras' and other's many examples in the Forum so I thought I might ask.
Stuart