        Here is a new Office program, it is a DAIRY
     
        The programs Use the CLOCK program that we all know about.
        The program sit in a directory DAIRY in the D.Time directory.
        The DAIRY directory contains 9 objects. 8 - programs, 1 - Data.
     
        DSHOW   - show future Dates
        ADD     - add Plan
        CDATE   - Current date in the wanted format
     
        FDATES  - list with the data
     
        The user use the dairy in the following way :
        insert data about future plans with the wanted date .
        then when the time come he check it and then He'll see the plan.
        the plan is text in any length THE program will show it with SCROLLING
        on the screen.
     
        The program use dates in the following format:
     
        198907201545
        1989            - year
            07          - month
              20        - day
                15      - hour
                  45    - minutes
     
        Here are the programs   ( In the Dairy directory)
     
1.      DSHOW
        <<
           IF FDATES SIZE 0 ==
           THEN "Empty Dairy" 1 DISP 450 .2 BEEP
           ELSE 0 -> li
             << CDATE FINDN DUP
                IF 0 ==
                THEN "Nothing to the future" 1 DISP 440 .2 BEEP .1 WAIT
                 FDATES SIZE 1 - SWAP DROP
                END DUP 0 DGET
                DO 0
                   DO
                   UNTIL KEY
                   END
                   IF DUP "UP" ==
                   THEN DROP OVER li DUP 1 - LICHK DUP 'li' STO DGET
                   ELSE
                     IF DUP "DOWN" ==
                     THEN DROP OVER li DUP 1 + LICHK DUP 'li' STO DGET
                     ELSE
                       IF DUP "LEFT" ==
                       THEN 0 'li' STO DROP SWAP DUP 2 - ICHK SWAP OVER 0 DGET
                       ELSE
                         IF DUP "RIGHT" ==
                         THEN 0 'li' STO DROP SWAP DUP 2 + ICHK SWAP SWAP OVER
                          0 DGET
                         ELSE
                           IF DUP "SHIFT" ==
                           THEN DROP DROP 1 CLMF
                           ELSE
                             IF DUP "DEL" ==
                             THEN DROP OVER DUP FDATES SWAP LDEL SWAP LDEL
                              'FDATES' STO
                               IF FDATES SIZE ==
                               THEN DROP 1
                               ELSE
                                 IF OVER FDATES SIZE >=
                                 THEN SWAP 2 - SWAP
                                 END OVER 0 DGET
                               END
                             ELSE DROP
                             END
                           END
                         END
                       END
                    END
                   END
                 UNTIL
                 END DROP
              >>
            END CLMF
         >>
     
         Example
     
         DSHOW          ! That's all it will show U the Data related to
                        ! the current date and then U can go both direction
                        ! future (->) or part (<-) then U can SCROLL the data
                        ! with (UP) or (DOWN).
                        ! the DEL key will remove the displayed Note (Data)
                        ! The SHIFT will and the program.
     
2.      ADD
        << -> d s
           <<
              IF FDATES SIZE 0 ==
              THEN d s 2 ->LIST 'FDATES' STO
              ELSE d FINDN DUP FDATES SWAP 1 - d SWAP LINS SWAP s SWAP LINS
                 'FDATES' STO
              END
           >>
        >>
     
        Example
     
        198907210000
        "Information about that date and plans for this date (in can be as long
        as we want it to be later we'll do SCROLLING)"
        ADD             ! Now it will be added to the data list (FDATES)
     
        Or
     
        CDATE           ! Current date
        3E4  +          ! In three days
        " Data "        ! " information about the future "
        ADD             ! Add it
     
3.      CDATE
        << DATE ARRAY-> DROP 100000000 * SWAP 10000 * + SWAP 1000000 * + >>
     
        Example
     
        To get the current date
     
        CDATE           ! This prog will return the current date in the format
                        ! That ADD needs
     
4.                      ! Not A User command
        DGET
        << 23 * 1 + -> i ci
           << 'FDATES(i)' EVAL ->STR "," 4 LINS "," 7 LINS "  " 10 LINS
              ":" 14 LINS 1 DISP 'FDATES(i+1)' EVAL DUP DUP 2 SWAP ci
              LDISP 3 SWAP ci 23 + LDISP 4 SWAP ci 46 + LDISP
           >>
        >>
     
5.                      ! Not A User command
        FINDN
        << 1 -> d i
           << 0
              IF FDATES SIZE
              THEN
                DO FDATES i GET
                  IF d >=
                  THEN DROP i
                  END
                UNTIL DUP i 2 + DUP 'i' STO FDATES SIZE 1 - > +
                END
              END
           >>
        >>
     
6.                      ! Not A User command
        LDISP
        << DUP 22 + SUB SWAP DISP >>
     
7.                      ! Not A User command
        ICHK
        << -> i ni
           <<
              IF ni 0 <= FDATES SIZE ni <= +
              THEN "End of the Dairy" 1 DISP 440 .2 BEEP i
              ELSE ni
              END
           >>
        >>
     
8.                      ! Not A User command
        LICHK
        << -> li ni
           <<
              IF ni 0 <=
              THEN 0
              ELSE DUP 'FDATES' SWAP 1 + GET SIZE
                IF ni 23 * 46 + >=
                THEN ni
                ELSE li
                END
              END
           >>
        >>
     
        Here are some other programs that this package use they are very useful
        not only to this application.
     
1.      LDEL
        << -> l n
           << l 1 n 1 - SUB l n 1 + l SIZE SUB +
           >>
        >>
     
        This program get string (or list) and index then it remove that
        element from the string (or list)
     
        Example
     
        { A B C D E }
        2
        LDEL
        Returns         { A C D E }
     
2.      LINS
        << -> l o w
           << l 1 w SUB o + l w 1 + l SIZE SUB +
           >>
        >>
     
        This program add element to list (string) after the n'th element
     
        Example
        { A B C }
        X
        2
        LINS
        Returns         { A B X C }
     
        or
        "ABCD"
        "XYZ"
        2
        LINS
        Returns         "ABXYZCD"
     
        OK To install the programs just type them in and do the next thing :
     
        { } 'FDATES' STO
     
        From now on U can add information about the future (or past) and
        handle it with this programs
     
     
        Any programs that help me to make the HP-28 a small Office manger
        will be welcome
     
        I'll be happy to get comments and/or improvements.
     
     
     
**********************************************************************
*   Strauss Erez.      Erez@Taurus    OR    Erez@Math.Tau.Ac.IL      *
*                                                                    *
*   Snail-mail : Strauss Erez, Mishmeret 45, Tel-Aviv 69694, Israel  *
*   Home phone : ... 972 3 424481                                    *
**********************************************************************
*   Make love Not War                                                *
**********************************************************************
