PDA

View Full Version : TechTip: Filter Your Text in RPG IV



Guest.Visitor
12-31-1969, 06:33 PM
** This thread discusses the article: TechTip: Filter Your Text in RPG IV (http://www.mcpressonline.com/index.php?option=com_content&view=article&id=3790) **
** This thread discusses the Content article: TechTip: Filter Your Text in RPG IV (http://www.mcpressonline.com/index.php?option=com_content&view=article&id=3790)0

johnbodia@yahoo.com
12-31-1969, 06:33 PM
** This thread discusses the article: TechTip: Filter Your Text in RPG IV (http://www.mcpressonline.com/index.php?option=com_content&view=article&id=3790) **
Wouldn't this be perfect for the powerful %REPLACE BIF instead of the character by character scan?

Guest.Visitor
12-31-1969, 06:33 PM
** This thread discusses the article: TechTip: Filter Your Text in RPG IV (http://www.mcpressonline.com/index.php?option=com_content&view=article&id=3790) **
Using <code>%REPLACE()</code>, you'd still have to locate the text to change, which would likely involve a character by character scan of some sort anyways. You could do the search using <code>%SCAN()</code>, but internally that still involves a character by character search through the string. Furthermore, a procedure involving <code>%REPLACE()</code> would almost certainly be slower since it would shift potentially a large amount of data within a character string for each replacement. Anyways, if you'd like to do some performance testing, I'm sure others would like to see the results.