From: jhmeyers@miu.edu (John H Meyers)
Subject: Tiny G/GX Spreadsheet (was: Need Spreadsheet)
Date: 13 May 1996 00:00:00 GMT
Message-ID: <4n74n1$328@news.iastate.edu>
references: <319517C6.1F53@julian.uwo.ca> <Pine.SOL.3.91.960512000254.20138A-100000@lonestar.jpl.utsa.edu>,<31969338.7868@julian.uwo.ca>
organization: MIU Computer Services,  Fairfield, IA 52557.  Not Approved.
reply-to: jhmeyers@miu.edu
newsgroups: comp.sys.hp48


In article <31969338.7868@julian.uwo.ca>,
Juan <jumana@julian.uwo.ca> writes:

Juan: [ needs a spreadsheet prog for GX ]

Alfred A. Arduengo: [ is updating exAL v4.6 to improved v5.0 in a few days ]

------------------

Meanwhile, here's a small program which does what my old
Panasonic word-processing typewriter passes off as a
"spreadsheet" -- it sums tabular rows and columns, period,
producing a total for each column and/or each row.

However, this is sometimes sufficient to do simple budgets
and expense reports, so I pass it on to you (and anyone else)
as something possibly useful (and not very memory-filling).

Would anyone who uses it please E-mail me, so I'll get an idea
of whether there is interest in such modest programs?  Thanks!

----------------------------------------------------------------

This "tiny-spreadsheet" for HP48G/GX merely totals the columns,
rows, or both rows & columns of a table (matrix); create your
matrix on level 1 with Matrix Writer or any other means,
execute this program to display a custom menu, and select
your menu choice:

TOTC    Add columns (totals appear in new last row)
ROW-    Remove last row

TOTR    Add rows (totals appear in new last column)
COL-    Remove last column

TOTRC   Add both rows and columns (totals appear in new last row & column)
R&C-    Remove last row and last column

Notes:  This program deletes any pre-existing statistics matrix (SigmaDAT).
        This program is for G/GX only.
        Stack diagram:  [[ matrix ]] -> [[ matrix ]]
        Only pure User RPL is used; any "Memory Lost" is HP's fault! :)

Disclaimer: This program is not merchantible or fit for anything;
            it might destroy your calculator and annihilate the universe.
            Author is not responsible for consequential or inconsequential
            damages.  Use at your own risk, or better yet: don't use at all! :)

Choose any name and download me via wire w/ascii transfer (Kermit):

No cable?  Type me in, noting that \GS is Greek Sigma; to find the
menu containing the "Sigma" commands, press left-shift, 5, A

Note that STO\GS is left-shift SigmaDAT, RCL\GS is right-shift SigmaDAT,
\GS+ is Sigma+ (is this clear in the User Guide?)

Bytes (when recalled to stack): 279.  Checksum: #602Fh

<...cut here for downloading...>

%%HP: T(3); @ use this line only for Kermit transfer
\<< {
  { "TOTC"  \<< STO\GS TOT \GS+ RCL\GS CL\GS \>> }
  {  ROW-   \<< DUP SIZE 1 GET ROW- DROP \>> }
  { "TOTR"  \<< TRN STO\GS TOT \GS+ RCL\GS TRN CL\GS \>> }
  {  COL-   \<< DUP SIZE 2 GET COL- DROP \>> }
  { "TOTRC" \<< TRN STO\GS TOT \GS+ '\GSDAT' TRN TOT \GS+ RCL\GS CL\GS \>> }
  { "R&C-"  \<< DUP SIZE 1 - { 1 1 } SUB \>> }
} TMENU \>> @ change TMENU to MENU to store program into CST menu

<...cut here for downloading...>

-----------------------------------------------------------
With best wishes from:  John H Meyers  ( jhmeyers@mum.edu )



From: jhmeyers@miu.edu (John H Meyers)
Subject: World's Tiniest Spreadsheet
Date: 14 Oct 1996 00:00:00 GMT
Message-ID: <53t4kg$lpn@news.iastate.edu>
organization: MIU Computer Services,  Fairfield, IA 52557.  Not Approved.
reply-to: jhmeyers@miu.edu
newsgroups: comp.sys.hp48


Sometimes all we want to do is total the rows and columns of a table.

Create a matrix or vector containing your table, press SUM, and voila,
the rows (if more than 1) and columns (if more than 1) are summed
in a final column and/or row (or final element of a vector);
use the Matrix Writer to view the augmented table.

The CUT function is provided to remove any sums appended by SUM.

For any fancier spreadsheet needs, see EXAL by Alfred Arduengo.

The object below can be downloaded as a single directory object
using your cable, or the individual programs may be typed in separately,
omitting the comments which begin with "@".

%%HP: T(3); @ Ascii translation: \GS = Sigma, \-> = RightArrow
DIR @ World's Tiniest Spreadsheet (G/GX only), (c) 1996 by John H Meyers
  SUM @ Append column and/or row sums to a matrix or vector (133 bytes)
    \<< DUP SIZE DUP SIZE GET 1 > @ Row sums
        { \->COL \->LIST DUP \GSLIST + OBJ\-> COL\-> } IFT
        DUP SIZE DUP SIZE 1 > SWAP 1 GET 1 > AND @ Column sums
        { \->ROW \->LIST DUP \GSLIST + OBJ\-> ROW\-> } IFT \>>
  CUT @ Remove sums created by SUM (103 bytes)
    \<< DUP SIZE SIZE 1 > @ Column sums
        { DUP SIZE OBJ\-> ROT 1 - 1 MAX ROT ROT \->LIST RDM } IFT
        DUP SIZE DUP SIZE GET DUP 1 > { COL- } IFT DROP \>> @ Row sums
END @ 242.5 bytes (on stack), #A07Bh checksum

-----------------------------------------------------------
With best wishes from:  John H Meyers  ( jhmeyers@mum.edu )
