Posts: 260
Threads: 0
Joined: Oct 2008
Quote:
Hello all.
Is it possible to enter programs into the 28, 48 or 50 with carriage returns or other spacing, indents/formatting so that when they're viewed on screen for editing the format is vertical and line breaks occur as desired? For example:
<< -> n
<< 0 1 n FOR Z
Z +
NEXT >>
>>
Thanks
Hi,
That's a good question. And a lot of RPL users may have appreciate this feature.
Unfortunately, as soon as you enter your code into the calculator, any carriage-return, double space or any other separator or duplicated separators are all discarded. In fact, the internal representation of any code is based on address-code, no trace of any separator are kept.
Edited: 5 June 2012, 8:06 a.m.
Posts: 591
Threads: 16
Joined: Feb 2012
Hi.
I usually do this manually, have not found any application that might be able to do that. But I'd not discard the programming features available in some powerful text editors, like Emacs, that could be properly programmed to modify a text file and generate, add such level of editing.
Cheers.
Luiz (Brazil)
Posts: 709
Threads: 104
Joined: Nov 2005
What you could do is edit the program as a "string" object and then save the program as a string with all the formatting you wish. When you want to run the program, just type: STR-> and evaluate the program.
<<
"
(your source code here)
"
STR-> EVAL
>>
This does not always work perfectly (as you cannot use string objects inside such program) using the built-in command line editor. However, a program like Emacs or Jazz's editor will handle this just fine
Edited: 5 June 2012, 11:13 a.m.
Posts: 63
Threads: 7
Joined: Mar 2010
Matt,
My simplistic technique for my HP 50g has been to do all my editing as a nicely formatted/commented text file on a PC. I then copy to the 50g and execute the program. If there's an error, I make the change on the PC and copy over again. I don't debug on the calc at all. Just my 2 cents.
Posts: 468
Threads: 17
Joined: May 2011
Hi Matt,
It is not possible as far I know _on_ the calculator, but you can use a PC. I like very much HPUserEdit 5 for this. It works directly with emu48 and you can transfer programs on a real calc via Conn4x
http://www.hpcalc.org/details.php?id=6600
it is in spanish by default but you can choose english (or french) language (not all is translate but very easy to use). Includes 'wizards' for CHOOSE and INFORM
user screen :