PDA

View Full Version : The API Corner: Reducing the Use of Compile-Time Arrays



jonathan.mason11
12-31-1969, 06:33 PM
** This thread discusses the article: The API Corner: Reducing the Use of Compile-Time Arrays (http://www.mcpressonline.com/index.php?option=com_content&view=article&id=14836) **
** This thread discusses the Content article: The API Corner: Reducing the Use of Compile-Time Arrays ("index.php?option=com_content&view=article&id=14836) **<br/>** This thread discusses the Content article: The API Corner: Reducing the Use of Compile-Time Arrays (http://www.mcpressonline.com/programming/apis/the-api-corner-reducing-the-use-of-compile-time-arrays.html) **

Hi Bruce

Interesting article. I use a similar technique of storing status codes, etc, in message descriptions, however I make the status code part of the message ID. For example all status codes might have a prefix of "STS" followed by digits or characters representing the type of status (or just filling in) and then the status code itself.

I tend to use numeric values for status codes, rather than "O" (Open), "C" (Closed), etc, so the message ID for Sales Orders would look something like:


"STS" + "01" + "01" = STS0101 = Open
"STS" + "01" + "99" = STS0199 = Ready to Purge
etc

All the best

Jonathan