Start of README v1.0

MC100 calculator


MC100 was developed by McKay Software Services Ltd www.mckaysoftware.ie

This describes the purpose and components of MC100 and how to download, install, and use the MC100 program.

MC100 is a calculator program for AS400/ ISERIES. It emulates a multi-function and multi-memory calculator.

    CONTENTS

  1. OPERATION
  2. FUNCTIONS
  3. FEATURES
  4. COMMANDS
  5. COMMAND KEYS
  6. DISPLAY
  7. To run MC100
  8. SAVEFILE
  9. SHIPPING LIST
  10. Change Log

  1. OPERATION
  2. A number or command is keyed on a line and ENTER is pressed. The number is preceded by an arithmetic operator + - * /. If the arithmetic operator is omitted, + is assumed. A negative number is entered by keying a minus sign after the number. The result is applied to the answer. A visible subtotal is updated after each line is entered. The entered number lines are rolled up. In this way, the numbers are always available to view.
    Each line is given its own numeric label, which increments automatically. The user may change this to an alphanumeric label.
    ===>CONTENTS

  3. FUNCTIONS
  4. The functions provided are ...
    Arithmetic
    Percent
    Factorial
    Nth Power
    Nth Root
    Absolute
    Random
    + - * /
    %
    !
    **
    //
    AB
    RAND
    • Arithmetic + - * /
    • 12, + 5, -25, /123, *754
      The arithmetic operator may be used in front of any other function, except AB.
      The number range is 9999999999999.999 and 9999999999999.99999-
    • Percent
    • 10%, *25%
      A negative number is converted to positive prior to the operation..
    • Factorial
    • 5!
      A negative number is converted to positive before the operation.
      Only the integer portion is used; any mantissa is ignored.
      The number range is 1 to 17.
    • Nth Power
    • **, **3, 5**, 4**5
      If no base (number to the left of **) is given, the answer is assumed.
      If no exponent (number to the right of **) is given, 2 is assumed.
      Only the integer portion of the exponent is used; any mantissa is ignored.
      When multiplying by a power, key * **.
      A negative base is converted to positive prior to the operation.
      A negative exponent is converted to positive prior to the operation.
    • Nth Root
    • //, //3, 5//, 27//3
      If no base (number to the left of //) is given, the answer is assumed.
      If no exponent (number to the right of //) is given, 2 is assumed.
      Only the integer portion of the exponent is used; any mantissa is ignored.
      When dividing by a root, key / //.
      A negative base is converted to positive prior to the operation.
      A negative exponent is converted to positive prior to the operation.
    • Absolute
    • ABsolute turns a negative answer into positive.
      Any arithmetic operator used in front AB is ignored.
    • Random
    • RAND will generate a random number in the range 0>1.
      RAND on its own will generate a different random number on each call.
      RAND cam be used with any integer of up to 10 digits.
      A different number is returned each time RAND is used..
      RAND followed by an integer will generate the same random number each time it is called wsoith that integber.
      ===>CONTENTS

  5. FEATURES
  6. The features provided are ...
    15 memory locations
    User names for each memory location
    User specified colours for memory values
    User name for answer
    User specified colours for answer values
    Editing
    Line numbers
    Line labels
    • 15 memory locations
    • 15 distinct memory locations are avilable.
      These may be named and edited separately.
      A Memory location can be keyed anywhere a number can be used. The number stored in that location is retrieved first.
    • User names for each memory location
    • The user can specify names for the memory locations.
      The name must start with an alphabetic character.
      Subsequent characters may be alphabetic or numeric or _ # @ $ £ €
      Alphabetic characters can be upper or lower case.
    • User specified colours for memory values
    • The user can specify colours for the value in memory locations.
      Different colours can be used for positive and negative numbers.
      The colours available are GREEN, WHITE, RED, TURQUIOSE, YELLOW, PINK and BLUE.
    • User name for answer
    • The user can specify a name for the answer location.
      The name must start with an alphabetic character.
      Subsequent characters may be alphabetic or numeric or _ # @ $ £ €
      Alphabetic characters can be upper or lower case.
    • User specified colours for answer values
    • The user can specify colours for the value in the answer location.
      Different colours can be used for positive and negative numbers.
      The colours available are GREEN, WHITE, RED, TURQUIOSE, YELLOW, PINK and BLUE.
    • Editing
    • The values in the answer and memory lcoations can be edited as follows .... Number of decimals
      Currency symbol
      Thousands separator
      Decimal separator
    • Line numbers
    • Each line is given an incrementing number as it is used.
      The user can replace this with a label.
      The number starts at 1 and increments to 9999
      Any numeric entries here are replaced by the line number.
      The line number can be used as a target in the UNDO, REDO and GOTO commands.
    • Line labels
    • Each line is given an incrementing number as it is used.
      The user can replace the line number with a label.
      The label must start with uppercase alphabetic, followed by uppercase characters or numbers.
      Note that the length of a label is 4 characters.
      The label can be used as a target in the UNDO, REDO and GOTO commands.
      ===>CONTENTS

  7. COMMANDS
  8. The commands provided are ...
    CA Clear Answer
    CM Clear Memory
    AM Answer to Memory
    MA Memory to Answer
    UNDO undo
    REDO redo
    GOTO goto line
    • CA Clear Answer
    • CA will clear the answer to zeros.
      The most recent subtotal entry is also cleared to zeros.
    • CM Clear Memory
    • CM, on its own, will clear all memory locations to zeros.
      CM, followed by a memory location, will clear that memory location to zeros.
    • AM Answer to Memory
    • CM, followed by a memory location, will copy the answer to the named memory location.
      This replaces any value previously in that location.
      The Answer location retains the value.
    • MA Memory to Answer
    • MA, followed by a memory location, will copy the contents of the named memory location to the Answer location.
      This replaces any value previously in the Answer location.
      The specified memory location retains the value.
    • UNDO undo
    • UNDO will undo or reverse out an operation. UNDO on its own will reverse out the last operation.
      UNDO TO will undo all the operations back to and including the specified line number or line label.
      UNDO ALL will reverse out all operations. Only entries from the Edit window and line labels will remain.
    • REDO redo
    • REDO will reinstate the corresponding UNDO'd operation. REDO on its own will reinstate earliest UNDO operation.
      REDO TO will reinstate all the UNDO'd operations up to and including the specified line number or line label.
      REDO ALL will reinstate all UNDO'd operations. Note that REDO always uses current values. For example, if a memory value is changed between the UNDO and REDO of a statement using that memory value, the changed memory will be used.
    • GOTO goto line
    • GOTO will display the specific line.
      Either a line number or a line label may be used as the target.
      ===>CONTENTS

  9. COMMAND KEYS
  10. The following command keys are used ...
    F3 Exit
    F6 Editing
    F9 Undo
    F10 Display Memory Locations
    F14 Display Command Keys
    F17 Top
    F18 Bottom
    F21 Redo
    F22 Display Legend

  11. DISPLAY

  12.  MC100S1             MC100  ISERIES CALCULATOR SIMULATOR               11/06/09 
                              MCKAY SOFTWARE SERVICES LTD                  23:20:53 
     JMCKAY           www.rpglanguage.com   www.mckaysoftware.ie                    
                                                                                    
     AN         1,374.19062                                                         
                                                                                    
     +  Add           **   Power          CA  Clear Answer         GOTO             
     -  Subtract      //   Root           CM  Clear Memory         UNDO             
     *  Multiply      AB   Absolute       AM  Answer to Memory     REDO             
     /  Divide        RAND Random No.     MA  Memory to Answer                      
     !  Factorial     %    Percentage                                               
                                                                                    
        5 5                    15.000000                                            
        6 *6                   90.000000                                            
        7 -7                   83.000000                                            
        8 /8                   10.375000                                            
        9 4!                   34.375000                   24                       
       10 **                   1,216.015620                1,181.64062              
       11 10%                  1,337.617180                121.60156                
       12 //                   1,374.190620                36.57344                 
       13                                                                           
                                                                             Bottom 
     F3 Exit     F9  Undo     F10 Memory     F17 Top                                
     F6 Edit     F21 Redo     F14 Keys       F18 Btm                                
     MC100S3             MC100  ISERIES CALCULATOR SIMULATOR               11/06/09 
                              MCKAY SOFTWARE SERVICES LTD                  23:55:34 
     JMCKAY           www.rpglanguage.com   www.mckaysoftware.ie                    
                                                                                    
    Temporary                               Expenses   255.55                       
    Airticket  175.25                       L9                                      
    Taxi       15.00                        LA                                      
    Meals      65.30                        LB                                      
    L4                                      LC                                      
    L5                                      LD                                      
    L6                                      LE                                      
    L7                                      LF                                      
        1 175.25               175.250000                                           
        2 am Airticket         175.250000                                           
        3 CA                                                                        
        4 15                   15.000000                                            
        5 am Taxi              15.000000                                            
        6 CA                                                                        
        7 65.30                65.300000                                            
        8 am Meals             65.300000                                            
        9 CA                                                                        
                                                                            More... 
     F3 Exit     F9  Undo     F22 Legend     F17 Top                                
     F6 Edit     F21 Redo     F14 Keys       F18 Btm                                                                
    
     MC100S3             MC100  ISERIES CALCULATOR SIMULATOR               11/06/09 
                              MCKAY SOFTWARE SERVICES LTD                  23:55:34 
     JMCKAY           www.rpglanguage.com   www.mckaysoftware.ie                    
                                                                                    
    Temporary                               Expenses   255.55                       
    Airticket  175.25                       L9                                      
    Taxi       15.00                        LA                                      
    Meals      65.30                        LB                                      
    L4                                      LC                                      
    L5                                      LD                                      
    L6                                      LE                                      
    L7                                      LF                                      
       10 Airticket            175.250000                                           
       11 taxi                 175.250000                  B201 Invalid entry       
       12 Taxi                 190.250000                                           
       13 Meals                255.550000                                           
       14 am Expenses          255.550000                                           
       15 CA                                                                        
       16                                                                           
                                                                                    
                                                                                    
                                                                             Bottom 
     F3 Exit     F9  Undo     F22 Legend     F17 Top                                
     F6 Edit     F21 Redo     F14 Keys       F18 Btm                                                                                               
    
    =+++++++++++++++++++++++++++++++++++++++++++++++=
    *                DEC CUR DEC THOU  COLOURS      /
    *                POS SYM SYM SYMB   +   -       /
    * AN  AN          5       .   ,    WHT WHT      /
    * L1  L1          5       .   ,    WHT WHT      /
    * L2  L2          5       .   ,    WHT WHT      /
    * L3  L3          5       .   ,    WHT WHT      /
    * L4  L4          5       .   ,    WHT WHT      /
    * L5  L5          5       .   ,    WHT WHT      /
    * L6  L6          5       .   ,    WHT WHT      /
    * L7  L7          5       .   ,    WHT WHT      /
    * L8  L8          5       .   ,    WHT WHT      /
    * L9  L9          5       .   ,    WHT WHT      /
    * LA  LA          5       .   ,    WHT WHT      /
    * LB  LB          5       .   ,    WHT WHT      /
    * LC  LC          5       .   ,    WHT WHT      /
    * LD  LD          5       .   ,    WHT WHT      /
    * LE  LE          5       .   ,    WHT WHT      /
    * LF  LF          5       .   ,    WHT WHT      /
    *                                               /
    *  ENTER to update                              /
    *  F12 to cancel                                /
    *                                               /
    =-----------------------------------------------= 
    
    =++++++++++++++++++++++++++++++++++++++++++++++++++++=
    *  C O M M A N D   K E Y S                           /
    *                            F12  Cancel             /
    *  F3   Exit                 F14  Command Keys       /
    *                            F17  Goto Top           /
    *  F6   Editing              F18  Goto Bottom        /
    *                                                    /
    *                                                    /
    *  F9   Undo                 F21  Redo               /
    *  F10  Display Memory       F22  Display Legend     /
    *                                                    /
    *                                                    /
    *               F12  Cancel                          /
    *                                                    /
    =----------------------------------------------------=
    
    ===>CONTENTS

  13. To run MC100
  14. Command MC100 calls the program MC100.
    There are no parameters to the command nor the program.
    This is a stand-alone program.
    The only file is the screen file MC100FM.
    Activation group is *CALLER.
    The objects can be stored in a library of your own choice.
    ===>CONTENTS
  15. SAVEFILE
  16. The objects are provided in a savef MC100SAVF.  To restore the savef, first create a savef on the AS400. Use FTP with binary to upload the file to the savf you created.
    You may then move the contents to a library or libraries of your choice.
    ===>CONTENTS

  17. SHIPPING LIST
  18. The following objects are shipped in the savefile MC100SAVF ...
    MC100CCMDThis is the command which calls the program.
    MC100RPGLE programThe calculator emulation program.
    MC100FMScreen fileScreen layouts
    MC100SRCSource fileThis contains the source for the command MC100.
    ===>CONTENTS


  19. Change Log V1.0

  20. Initial release of MC100
    ===>CONTENTS


30 Oct 2009
©2009 McKay Software Services Ltd
www.mckaysoftware.ie
www.rpglanguage.com
End of README v1.0