Formatting 28/48/50 programs



#11

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


Edited: 5 June 2012, 12:44 a.m.


#12

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.

#13

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)


#14

Quote:
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.

Nearly decades ago I wrote a DOS program called STRUCTHP available at http://hp.giesselink.com/pcuti.htm exactly doing this. The disadvantage, the program is so old that the program documentation and messages are only available in German.

The program can format many types of programs in ASCII format. In the case of a HP48 ASCII file with the header

%%HP: T(3)A(R)F(.);

you can call STRUCTHP with

structhp /48:L3 infile outfile

where

  • /48:L3 is an option to tell structhp that the infile is an HP48 ASCII file with the %%HP: header and that the output file should be still an HP48 ASCII calculator file in translation mode 3
  • infile is the source file name
  • outfile is the destination file name

There're many other options to change the no. of blanks for insertion or changing right and left margins.

All listings in the book http://www.amazon.de/28S-48-Programme-Mathematik-Elektrotechnik/dp/3882290315 have been formatted with this tool.

Cheers

Christoph

#15

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.

#16

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.


#17

Good point. As 'HPConnect' ( HPConnect ) allows me to use the 50G with my Mac, this sounds like a viable option for me.

Thanks

Edited: 5 June 2012, 12:25 p.m.

#18

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 :


#19

Is there a version for the Mac?


#20

No,It is only for Windows as far I know


Possibly Related Threads...
Thread Author Replies Views Last Post
  HP Prime... NOT meant to replace HP48,49,50 ? Chris Pem10 21 858 11-18-2013, 03:30 PM
Last Post: Chris Smith
  HP Prime: the drama of the Apps button, shutdown, formatting, nothing solves Davi Ribeiro de Oliveira 0 135 11-17-2013, 07:23 AM
Last Post: Davi Ribeiro de Oliveira
  HP Prime: the drama of the Apps button, shutdown, formatting, nothing solves Davi Ribeiro de Oliveira 1 161 11-16-2013, 11:26 PM
Last Post: Michael de Estrada
  Formatting the app view message with bullets (dots) Geoff Quickfall 4 213 10-14-2013, 06:22 PM
Last Post: Geoff Quickfall
  Prime formatting behavior Camille 0 101 09-28-2013, 05:37 PM
Last Post: Camille
  ANN: A MacOSX Kermit program for HP48/49/50 calculators Paul Onions 2 189 09-08-2013, 04:55 AM
Last Post: Paul Onions
  HP-50 on Raspberry Pi? The HP-67 come true? Matti Övermark 10 398 07-30-2013, 09:40 PM
Last Post: Matti Övermark
  wp-34s command formatting Andrew Nikitin 4 217 06-08-2013, 03:28 AM
Last Post: Paul Dale
  Precision DC-50 Mic 3 216 05-26-2013, 01:27 PM
Last Post: DavidM
  downloading HO 229 v. 2,0 from HP 49/50 Astronomy Programs list Al 10 385 11-26-2012, 05:38 PM
Last Post: Al

Forum Jump: