swivelgames wrote:
Understood. I know I'll definitely be using this if/when it's implemented Smile

Keep up the good work, Kerm! I'm quite excited to start using these Smile
Glad to hear it! Sum(7) is all done, as you probably saw, so I need to write sum(12) next, figure out why sum(10) is throwing errors, and then probably release Doors CS 6.7 before I tackle sum(13).
merthsoft wrote:
KermMartian wrote:
Well, since it has to be a token thing, it can be something like token(#,{value}) to push, and token(#+1) to pop to Ans. Therefore, you could put Ans as {value}, but you could equally use 3 or -9.1204 instead, which would leave Ans intact until you popped, right?


Sounds great to me. While you're at it, you could just make lots of stack stuff, like peek, swap, toss (tacos), etc.
Just to bump this for a second, needless to say that I haven't implemented this Ans stack idea yet. Is there still interest in it? I realized I could just make an Appvar named Ans for it.

Edit: Alternatively, which would speed things up a lot, I could hijack one of the string variables or something.
KermMartian wrote:
merthsoft wrote:
KermMartian wrote:
Well, since it has to be a token thing, it can be something like token(#,{value}) to push, and token(#+1) to pop to Ans. Therefore, you could put Ans as {value}, but you could equally use 3 or -9.1204 instead, which would leave Ans intact until you popped, right?


Sounds great to me. While you're at it, you could just make lots of stack stuff, like peek, swap, toss (tacos), etc.
Just to bump this for a second, needless to say that I haven't implemented this Ans stack idea yet. Is there still interest in it? I realized I could just make an Appvar named Ans for it.


Me! I would much appreciate it, even if its just a separate program
I think that I probably will indeed implement it as sum(14,N) and sum(15); I just want to make sure that other people will use it. Any takers?
wait... wouldn't it be sum(14) and sum(15). Push whatever is in answer at the time, and pop answer?
KermMartian wrote:
I think that I probably will indeed implement it as sum(14,N) and sum(15); I just want to make sure that other people will use it. Any takers?


I might use something like that.
_player1537 wrote:
wait... wouldn't it be sum(14) and sum(15). Push whatever is in answer at the time, and pop answer?
Oh, I suppose so, I was thinking that you could specify the Ans to push, like either sum(14,Ans) or sum(14,5.6X^2) so that you wouldn't necessarily be forced to push Ans itself. Would your method be better, or what I was thinking, in terms of speed and size and flexibility?

@EpicFail: aight, good to know, thanks. Smile
idk, but the way I would use it, it would push the answer that is already there when the command is called. What about this: if you use "sum(14)" it will push the ans that is currently in place, and "sum(14,value)" would push the value. One last thing, would it push lists too?
KermMartian wrote:
_player1537 wrote:
wait... wouldn't it be sum(14) and sum(15). Push whatever is in answer at the time, and pop answer?
Oh, I suppose so, I was thinking that you could specify the Ans to push, like either sum(14,Ans) or sum(14,5.6X^2) so that you wouldn't necessarily be forced to push Ans itself. Would your method be better, or what I was thinking, in terms of speed and size and flexibility?


I like the flexibility of push(whatever). Presumably we could use variables and whatnot as well? Like, could I push(A)? push([A])?! That would be neat.
_player1537 wrote:
idk, but the way I would use it, it would push the answer that is already there when the command is called. What about this: if you use "sum(14)" it will push the ans that is currently in place, and "sum(14,value)" would push the value. One last thing, would it push lists too?
Ah, that's a good idea, differentiate based on the number of arguments to sum(14).

@Both Merthsoft and Player, regarding pushable types: Interesting, I wonder what I'd have to support? I guess lists, strings, reals, complexes, matrices? Is that enough?
KermMartian wrote:
Interesting, I wonder what I'd have to support? I guess lists, strings, reals, complexes, matrices? Is that enough?

Anything that Ans can be, I'd assume. That list sounds conclusive.
another idea, maybe move it all to sum(14) but have it sum(14,1 push Ans, sum(14,1,value push the value, and sum(14,2 return the data type that was last pushed. But that could be left out if you leave the programmer to remember what they pushed
_player1537 wrote:
another idea, maybe move it all to sum(14) but have it sum(14,1 push Ans, sum(14,1,value push the value, and sum(14,2 return the data type that was last pushed. But that could be left out if you leave the programmer to remember what they pushed


sum(14, 1) isn't saving you anything over sum(14, Ans), so it might as well just be sum(14, val). As for getting the data type, I don't really see that as being useful, so long as you're paying attention to what you're pushing. Maybe if your program is doing something depending on what's on top of the stack, and so needs to check it, but you could just push a flag for the same effect.
I'd like to keep it as simple as possible, so I think sum(14,#) to push #, and sum(15) to pop Ans will be good enough for me. I'm not going to bother trying to push and pop things like Y equations, Pics, GDBs, and all those other annoying data types, agree?
KermMartian wrote:
I'd like to keep it as simple as possible, so I think sum(14,#) to push #, and sum(15) to pop Ans will be good enough for me. I'm not going to bother trying to push and pop things like Y equations, Pics, GDBs, and all those other annoying data types, agree?


I agree, but if you can pop ans, then doesn't that mean you can pop pics, GBDs, ect...?
xXEpicxXXxFailXx wrote:
KermMartian wrote:
I'd like to keep it as simple as possible, so I think sum(14,#) to push #, and sum(15) to pop Ans will be good enough for me. I'm not going to bother trying to push and pop things like Y equations, Pics, GDBs, and all those other annoying data types, agree?


I agree, but if you can pop ans, then doesn't that mean you can pop pics, GBDs, ect...?
No, because I'll have to add sections of code to create temporary versions of all those datatypes to pipe into Ans. It's not as easy as simply saving a chunk of data, then just dumping the chunk back into Ans. You have to create a temporary list (or matrix, or equation, etc), then point Ans at that temporary item.
That makes sense. Very Happy
KermMartian wrote:
I'd like to keep it as simple as possible, so I think sum(14,#) to push #, and sum(15) to pop Ans will be good enough for me. I'm not going to bother trying to push and pop things like Y equations, Pics, GDBs, and all those other annoying data types, agree?

That sounds great to me.
merthsoft wrote:
KermMartian wrote:
I'd like to keep it as simple as possible, so I think sum(14,#) to push #, and sum(15) to pop Ans will be good enough for me. I'm not going to bother trying to push and pop things like Y equations, Pics, GDBs, and all those other annoying data types, agree?

That sounds great to me.
Good, then I'll get started on this. Components I'll need are (1) automatic creation and deletion of an Ans appvar; (2) marshaling of data into the appvar (3) removal of data from the appvar and into Ans. Based on the available romcalls, I'll be supporting these types:

1) Reals [no func]
2) Complexes [no func]
3) Real Lists [CreateTRList]
4) Complex Lists [CreateTCList]
5) Strings [CreateTempString]
6) Real Matrices [CreateTRMat]
could you set it up so that if the second argument in sum(14) is blank that it will default to pushing Ans?
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
» Goto page Previous  1, 2, 3, 4, 5, 6, 7, 8  Next
» View previous topic :: View next topic  
Page 6 of 8
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement