Difference between revisions of "Personal record keeping"

From Ninerpedia
Jump to navigation Jump to search
m (add close file)
(add category)
Line 128: Line 128:


[[Category:Module]]
[[Category:Module]]
[[Category:Programming]]
[[Category:Programming language]]

Revision as of 18:07, 8 October 2014

The Personal Record Keeping (PRK) module enables you to store up to about 10k of data, and provides various handling and output facilities to help you manipulate your records.

A printer is useful but not essential. If you have a printer, greater flexibility of display, as well as additional functions, are provided with the Personal Report Generator module, which requires data prepared with the Personal Record Keeping module.

The PRK sorting routines are slow.

Data is saved in memory image ('program') format, and thus uses less tape (or disk) space, is faster to save and load, and the verify option is available for tape files.

You will not be able to catalog a collection of six thousand records, but small collections can be catalogued with the module . The number of items depends on how many characters you wish to use to describe each item.

It is possible to use the PRK module as a simple diary system, or as a very simple spreadsheet, as it is possible to perform mathematical operations on the data you place in your module.

Enhanced Basic

The Personal Record Keeping and the Statistics modules both extend the range of commands available in TI BASIC. This was not publicised. The term Enhanced Basic was given by Peter Brooks who published a great deal on the extra CALLs.

These extra commands are the only way in which a user can save data in PROGRAM format - used by most TI Modules. Program format permits tape verification, and uses a lot less space on your tape or disk.

With either module inserted, select TI BASIC. You may now use the following commands:

Screen Display CALL D

CALL D(R,C,L,V)

Where R and C are the row and column the word is to start at.
L is the length of screen to be blanked from position
R,C and also sets the maximum length of the display
V is a value or string or variable to be displayed.

If V is longer than L, the display will be curtailed.
R,C and L may be numbers or numeric variables.

Try:
CALL D(10,4,5,1/3)        

Input of data by user CALL A

CALL A(R,C,L,F,A,MN,MX)

R,C and L are as with CALL D, but in CALL A, L sets the
maximum length of the input.
F   MUST   be a NUMERIC VARIABLE. It takes a value of 1 if
ENTER is pressed, and other values if some control keys are used
eg BEGIN:6  REDO:4  AID:3  BACK:7  CLEAR:2
A is the numeric or string VARIABLE to be filled with the
input.
MN and MX are optional when using a numeric variable, and set
the minimum and maximum acceptable values: any input outside
these values is rejected.
      

NB: The CLEAR key is used to clear the input field. It WILL NOT break into the program! Use CALL A with a little care if you think you may need to BREAK the program!


Partition Memory CALL P

CALL P

Save Memory Image CALL S

CALL S

Load Memory Image CALL L

CALL L

Define Data Header CALL H

CALL H

Data field handling CALL G

CALL G

Transferring PRK data to a Display Variable disk file for TI Writer

This BASIC program requires a Personal Record Keeping module and a disk drive with disk controller.

Console set up:

Insert PRK module and then select TI BASIC (Stats module may also be used)
FIRST: Is disk drive connected? Set buffer location with CALL FILES(1) then NEW -
THEN: type CALL P(10900) then type NEW
Console memory is now set up

RESTRICTIONS:

The disk system and this program use up memory.

It may be necessary to delete some records from the PRK file to be transferred if the PRK file fully utilises system memory.


99 REM Load the PRK file
100 CALL L("DSK1.PRKFILE",Y)
102 REM is file loaded?
110 IF Y=0 THEN 320
111 REM NOW open output file
112 REM NB: do not open output file until after Call L !
120 OPEN #1:“DSK1.TIH_FILE“,DISPLAY,VARIABLE 80
121 REM How many fields in each record?
130 CALL H(1,5,0,F)
140 PRINT "FIELDS":F
141 REM How many records (pages)?
150 CALL H(1,6,0,R)
160 PRINT "RECORDS":R
161 REM Now loop: through each record:
170 FOR J=1 T0 R
171 REM and through each field in turn
180 FOR T=1 TO F
181 REM Is the field a number or a string?
190 CALL H(1,10,T,TP)
200 IF TP=1 THEN 240
201 REM for numeric data:
202 REM get the data in record J,. field T
210 CALL B(1,J,T,Z,RD)
211 REM and print it to disk
220 PRINT #1:RD 
230 GOTO 270
231 REM for string variable data:
240 CALL G(1,J,T,Z,RD$)
250 PRINT J;T;RD$
260 PRINT #1:RD$
270 NEXT T
271 REM insert spacing as required
280 PRINT #1:" "::: 
290 NEXT J
300 CLOSE #1
310 END
320 PRINT "NOT LOADED“

If required, string and numeric data can be concatenated to the preferred format before printing to disk. Read each required field, concatenate, and print.

Each print to disk should be considered as one TI Writer line:

Use of pending outputs is to be avoided, as is the use of a semi colon print divider, due to the complex requirements of DISPLAY format.