× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Scott Klement wrote:

Hi Michael,


Hmmm...doesn't seem to work...gives me a compile error. Odd though...it
knows the %len and the %decpos of variable a at compile time.


%len() is an actual function that gets run at runtime.  I believe that the
reason for this is that you can put variable-length data in it.

For example, %len(%trimr(foo))... this can't be done at compile time
because the length of a trimmed string depends on it's contents, which
obviously can change at runtime.

But, by assigning %len() to a named constant, that forces it to be a
constant number that's known at compile time.   that's why my example
works...

This has been discussed elsewhere.

No, the reason %DEC(...:%LEN():%DECPOS()) doesn't work is because of a compiler limitation. All of us on the compiler development team have tried *and failed* to get this to work properly. Barbara came the closest to a real fix, but it just wasn't quite there yet. So, unless we can do a major rewrite of the expression handling, this truly annoying restriction stays in place.

Cheers! Hans


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 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.