|
Hi Charles, > Actually, not only did I suggest it. I tested it before posting it; thus my > post points out that it doesn't work. > The compiler doesn't like pointers as FOR loop index variables. And even if the compiler did let you use a pointer as a loop index, you'd still have the risk of an MCH0601, because a FOR loop always increments the index one extra time. Here's a really trivial example that illustrates this: D x s 10I 0 c for x = 1 to 10 c endfor c dsply x c eval *inlr = *on What will the value of X be when it does the DSPLY? It'll be 11. One higher than the end of the loop... When you do that with a pointer, you run the risk of the MCH0601, which is what Barbara was warning me against. I suppose I could write my own FOR-like op-code :)
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.