Post Reply 
41C X-Mem data file editor?
10-22-2020, 07:19 PM (This post was last modified: 10-22-2020 07:20 PM by Dave Britten.)
Post: #15
RE: 41C X-Mem data file editor?
(10-22-2020 05:46 PM)rprosperi Wrote:  
(10-22-2020 12:49 PM)Dave Britten Wrote:  I'm not sure what you mean by multiple fields per record, though. Aren't data files just a linear set of storage registers akin to a 1-column matrix on the 42S? Or is this some more exotic functionality I have yet to discover?

Sorry, brain fart - I was using the 71B's data files recently, which support this. Not relevant for 41 files and confusing the issue, ignore this.

I should have known Angel would have one of these, though I''m not familiar so it must be in some of his modules I don't regularly use.

Note that the non-std (i.e. not built into 41CX) WORKFL command near the end is included in the 41X.

I was suspecting that might have been a 71B thing. Wink Haven't had the privilege of playing with one myself.

WORKFL returns the name of the current working file, right?

Here's a rough draft of my editor so far, in case anybody wants to try it out. There's still plenty of room for code optimization.

To use it, put the name of a data file in alpha, and XEQ "EDD". Note that this uses the AIP function from the Advantage module.

The screen will show something like 0:0.0000, which is the item position (i.e. what you would get from RCLPT), followed by the value of that item.

Keys:

SST - Next item
RCL or Shift + BST - Previous item
STO - Input item
Shift + LBL - Insert item at the current position (new item defaults to 0)
Shift + CLx - Delete item at current position
ON or Backspace - Exit editor

To enter data, either move to the item you wish to replace, or move past the end of the file, where "NEW" is displayed, and press STO. The program will stop, allowing you to enter/calculate a value. Press R/S to save the item's new value.

You can execute any functions or programs here, as long as they don't modify registers 00 or 01, or open a different extended memory file. There is a temporary user key assignment made to R/S so as long as USER mode is on, R/S will continue in EDD regardless of any other programs you've executed (and left the program pointer sitting in). If USER mode gets turned off, R/S will still work as long as the program pointer hasn't been moved from its location in EDD. The temporary key assignment will be removed when the program is resumed.

Inserting and deleting is fairly simple. Just use SST/RCL to move to the item you want to delete, or the position where you want to insert a new record, and press the appropriate key. When deleting, items following the selected item are moved to one position earlier in the file, and the file is shortened by one register. When inserting, the file size will be increased by one register, and the current and all following items will be moved down one position, leaving a 0 in the newly vacated position. You can then press STO to enter a value for the inserted item.

I'll probably add a "total" function that sums up all the items in the file, similar to the 17BII list editor.


.zip  EDD.zip (Size: 415 bytes / Downloads: 5)
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
41C X-Mem data file editor? - Dave Britten - 10-21-2020, 02:13 PM
RE: 41C X-Mem data file editor? - hth - 10-21-2020, 06:14 PM
RE: 41C X-Mem data file editor? - Dave Britten - 10-22-2020 07:19 PM



User(s) browsing this thread: 1 Guest(s)