|
Dan Rasch wrote: >Is there a simple way to SCAN for special >characters? I am writing a front-end edit >and currently coded up 20 or so SCAN blocks. Although this isn't the RPG list, I thought the technique would be applicable to multiple languages. The idea is to translate all the "special" characters to another (single) special character and then scan for that. Beware the tradeoff of programmer (author) convenience for run time performance and future maintenance. Tricks like this are seldom worth the effort unless you explain why you did it. H Debug Dftactgrp(*No) Actgrp('QILE') Option(*Srcstmt: *NodebugIO) * dbgview(*list) d fr s 5a inz('!@#$%') d to s like(fr) inz(*all'~') d workString s 20a inz('Now! The # of $ is %') d workPos s 10u 0 inz c fr:to xlate workString workString c '~' scan workString workPos c dump c eval *InLR = *On Buck Calabro Aptis; Albany, NY "We are what we repeatedly do. Excellence, then, is not an act, but a habit." --Aristotle Billing Concepts Corp., a NASDAQ Listed Company, Symbol: BILL +--- | This is the Midrange System Mailing List! | To submit a new message, send your mail to MIDRANGE-L@midrange.com. | To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com. | To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com. | Questions should be directed to the list owner/operator: david@midrange.com +---
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.