Post Reply 
Free42 LSTO REGS
10-24-2019, 12:57 PM (This post was last modified: 10-24-2019 12:57 PM by Epidiah.)
Post: #16
RE: Free42 LSTO REGS
It's a long, dark road, indeed!

Not to distract from any discussion about function-like routines--because if I'm honest, I find the prospect of a FLBL thrilling and looking at the 17 files states I've built around program themes it's clear this is the direction I'm naturally drifting toward--I wanted to sing the praises of LSTO REGS one more time.

This combo has made working with two matrices and moving data between them without disturbing the contents of REGS a bit of a breeze. Here's a quick one I whipped up that takes a vector and turns it into the main diagonal of a square matrix.

Code:
00 { 89-Byte Prgm }
01▸LBL "V→[\]"
02 LSTO "L"
03 LSTO "REGS"
04 R↓
05 LSTO "Y"
06 R↓
07 LSTO "Z"
08 R↓
09 LSTO "T"
10 R↓
11 DIM?
12 X<Y?
13 X<>Y
14 ENTER
15 NEWMAT
16 -1
17 RCL+ ST L
18 1ᴇ-3
19 ×
20 LSTO "#"
21 R↓
22 EDIT
23▸LBL 00
24 RCL IND "#"
25 →
26 ↓
27 ISG "#"
28 GTO 00
29 EXITALL
30 RCL "L"
31 STO ST L
32 R↓
33 RCL "T"
34 X<>Y
35 RCL "Z"
36 X<>Y
37 RCL "Y"
38 X<>Y
39 END

I'm throwing LSTO all over the place here to preserve the stack and the REGS, but the main thing is that I can have the program EDIT one matrix while another sits in REGS where I can pluck entries out of it at whim. That's so much easier than flopping back and forth, indexing one matrix after another, adjusting I and J each time.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Free42 LSTO REGS - Epidiah - 09-25-2019, 03:52 PM
RE: Free42 LSTO REGS - David Hayden - 09-26-2019, 05:50 PM
RE: Free42 LSTO REGS - Guenter Schink - 09-26-2019, 08:10 PM
RE: Free42 LSTO REGS - Thomas Okken - 09-28-2019, 02:53 AM
RE: Free42 LSTO REGS - Thomas Okken - 09-28-2019, 03:19 AM
RE: Free42 LSTO REGS - Namir - 10-04-2019, 12:34 PM
RE: Free42 LSTO REGS - Paul Dale - 10-05-2019, 08:46 AM
RE: Free42 LSTO REGS - SammysHP - 10-21-2019, 09:31 AM
RE: Free42 LSTO REGS - Epidiah - 10-21-2019, 03:07 PM
RE: Free42 LSTO REGS - Thomas Okken - 10-23-2019, 12:01 PM
RE: Free42 LSTO REGS - Epidiah - 10-23-2019, 02:22 PM
RE: Free42 LSTO REGS - Epidiah - 10-25-2019, 01:50 AM
RE: Free42 LSTO REGS - SammysHP - 10-25-2019, 07:17 PM
RE: Free42 LSTO REGS - Epidiah - 10-26-2019, 02:52 AM
RE: Free42 LSTO REGS - rprosperi - 10-23-2019, 01:38 PM
RE: Free42 LSTO REGS - Thomas Okken - 10-23-2019, 11:51 PM
RE: Free42 LSTO REGS - Thomas Okken - 10-24-2019, 11:37 AM
RE: Free42 LSTO REGS - Paul Dale - 10-24-2019, 12:26 PM
RE: Free42 LSTO REGS - Epidiah - 10-24-2019 12:57 PM
RE: Free42 LSTO REGS - Werner - 10-25-2019, 06:21 AM
RE: Free42 LSTO REGS - Epidiah - 10-25-2019, 02:02 PM



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