× 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.



On 12/2/2010 3:23 PM, hockchai Lim wrote:
nah, I trust Barbara's coding skill a bit better than my own. Plus, she can
probably comes up with something that is really easy to use like "rate =
%move(char7)", which I won't be able to do if I would have to create one on
my own.


I completely agree with Brian on this.

If it is really common for you to have strings of digits that you want to interpret as values with decimal places, then write a procedure like this, that returns some size of packed value that will handle all your needs, say a 63,15 packed value:

getDecVal(string : number_of_decimals);

Input: '12345' 2 Returns: 123.45
Input: '1234N' 3 Returns: -12.345

It might not be particularly easy to write, but once it is written, you are done forever, and your code will be much clearer than it would have been with the MOVE opcode.

rate = %getDecVal(char7 : 2);




As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.