SCOUG-SundialSIG Mailing List Archives
Return to [ 31 | 
May | 
2001 ]
<< Previous Message << 
 >> Next Message >>
 
 
 
Content Type:   text/plain 
Lynn H. Maxson wrote:  
>   
> you could have solved this using PL/I  
 
Lynn knows my weak spot -- PL/I is my all-time favorite language.  
 
> and declaring the field to be "fixed bin (31,5),  
> a fullword binary number with a fractional part.  
 
There were two considerations:  
 
-- First, ease of entering the data via the keyboard.  By eliminating  
the "/", there are fewer keystrokes and fewer chances for entry error.  
 
-- Second, my software was originally developed for 286 and 386  
machines.  Lynn is correct that a fullword binary number will work, and  
in fact that's what I used.  The only difference is that I used a  
"scaling factor" on the data so there was no fractional part.  When the  
data was read into memory the input routine scanned it for the  
fractional parts that were used.  If there were, for example, 8ths but  
no 16ths then the scaling factor was 8 and every data value was  
multiplied by 8 (2-1/8 would become 17).  Once processing was done the  
answers were scaled back to the "proper" values.  By using fullword  
binary numbers (32 bits including sign bit) instead of floating point,  
the calculations ran much faster.  (My early compiles used 16 bit  
values, which gave a typical price range of 1/16 to $2000.  I wrote my  
own LIM access routines to get around memory thrashing.)  
 
> Of course, if you are using REXX, C, PASCAL,  
> COBOL, FORTRAN, JAVA, C++, LISP, PROLOG,  
> or even assembler, you can't do that.  
Why not?  I used assembler and Pascal.  Do you mean the (31,5) part with  
the compiler tracking the fractional point during calculations?  Yes,  
then you're correct that "you can't do that" -- although the execution  
speed is the same.  At the time I didn't have a PL/I compiler because I  
was running DOS (my Digital Research PL/I compiler ran on CPM).  I now  
have IBM's PL/I.  
 
> Just note that this capability, which has never  
> been reproduced in any other programming  
> language, has been available since 1964.  
Lynn is referring to the original PL/I language specification, developed  
in 1964.  Lynn, didn't they swipe that from Algol?  
 
> Peter has provided excellent insight into how  
> he processes, stores, maintains, and retrieves  
> his financial data.  May I suggest that he  
> expand it into a more formal presentation  
> combined with a Q&A to serve as the topic  
> for our next Sundial SIG meeting in June?  
 
I might be over at the Programming SIG trying to run EMX compiles with  
Dallas and Steven.  
 
Just store the data in the format you receive it in, in any filename you  
like.  Let the program figure out and "learn" where the data is.  
 
- Peter  
 
 
 
=====================================================  
 
To unsubscribe from this list, send an email message  
to "steward@scoug.com". In the body of the message,  
put the command "unsubscribe scoug-sundialsig".  
 
For problems, contact the list owner at  
"rollin@scoug.com".  
 
=====================================================  
 
  
<< Previous Message << 
 >> Next Message >>
Return to [ 31 | 
May | 
2001 ] 
  
  
The Southern California OS/2 User Group
 P.O. Box 26904
 Santa Ana, CA  92799-6904, USA
Copyright 2001 the Southern California OS/2 User Group.  ALL RIGHTS 
RESERVED. 
 
SCOUG, Warp Expo West, and Warpfest are trademarks of the Southern California OS/2 User Group.
OS/2, Workplace Shell, and IBM are registered trademarks of International 
Business Machines Corporation.
All other trademarks remain the property of their respective owners.
 
   |