Path: utzoo!mnetor!uunet!husc6!bbn!mit-eddie!uw-beaver!tektronix!reed!nscpdc!rgb From: rgb@nscpdc.NSC.COM (Robert Bond) Newsgroups: comp.sources.d Subject: Re: Spread Sheet Calculator ( by Robert Bond) Message-ID: <1003@nscpdc.NSC.COM> Date: 7 Mar 88 21:36:49 GMT References: <2227@bath63.ux63.bath.ac.uk> Organization: NSC Portland, Oregon Lines: 94 From article <2227@bath63.ux63.bath.ac.uk>, by sc_mjlo@ux63.bath.ac.uk (Miles Osborne): > I have a couple of queries concerning the spreadsheet calculator program. > > i) Defining variables - I have realised that these can be defined by directly > editing the spreadsheet file- but can they be set whilst in the spreadsheet --- other stuff deleted --- To define a variable called dogfood, which defines a range of a0 through d10, try entering exactly these key strokes: /ddogfood"a0:d10 where means type a space character and means type the return key. You will notice that the leading quotation mark is supplied by the prompt. To see your variable definitions, type /s you will be dumped into less so you can page through them. You need to do a P (put) command to save the variable names. You should not edit the spreadsheet files just to play with variables. To fill the range dogfood with data, type /fdogfood 1 1 > ii) Macros - Can anyone give me a better idea than the man page does on what > these should look like and how they can be used. > As the README says, the support is primitive. They are just files you M (merge) into the spreadsheet, but I have provided hooks so you can set up a path to the to-be-merged files. The format of the files is the same as the spreadsheet save file format. An obvious enhancement is a mechanism to save keystrokes. A better macro file format would be good too. We used them here to write out summary reports from a spreadsheet and clean up the current working area, ready for next month's data. Here is one of the files: goto A200 erase fcst copy fcst fcst01 write "EXPFCST.P01" expfcst copy recf01 fcstd01 value recf01 goto expfcst As you can see, the macro lives in the context of an application. "recf01", "fcstd01", "fcst01", and "expfcst" are all ranges. "EXPFCST.P01" is a file. You can get an idea of the format of the files by looking at the commands the parser accepts. See gram.y. The reason I did not document this more is I DO NOT want lots of people using it. It is too primitive - I don't want to spend all of my time answering questions about it. I believe the real die-hards will figure it out, and would have done so with the M (merge) command anyway. I expect this paragraph will sink me all by itself. > iii) Is there anyway other than the goto command of going down say 20 lines > or across 20 lines etc. Lots of ways - If you are trying to go down 20, type 20j or 20^n Most of the time what you really want is to get the the first or the end of a range so ^en or w is what you want to do. I would normally have expected a letter like this to come to me directly, rather than posting it to the net. I DO welcome mail about sc and WILL answer it. Even if it is about macros. :-) Good Luck, Bob -- Robert Bond ihnp4!nsc!nscpdc!rgb National Semiconductor tektronix!nscpdc!rgb