editing programs on hp-50g - Hewlett Packard

This is a discussion on editing programs on hp-50g - Hewlett Packard ; I am still learning about my hp-50g. I have a question about editing programs. When I am through editing a program and hit the Enter key to get ready to stor it back into a variable, a whole lot of ...

+ Reply to Thread
Results 1 to 4 of 4

Thread: editing programs on hp-50g

  1. editing programs on hp-50g

    I am still learning about my hp-50g. I have a question about editing
    programs. When I am through editing a program and hit the Enter key
    to get ready to stor it back into a variable, a whole lot of the
    editing/formatting is lost. E..g.,

    <<
    1 100 FOR I
    TIME 5 DISP
    NEXT
    >>


    becomes

    << 1 100
    FOR I TIME 5 DISP
    NEXT
    >>


    or worse. Is there a way (besides editing on a different computer
    in a text editor) to make the program keep the editing I want it to
    have. It makes it difficult to edit larger programs because the
    formating changes. I presume it does this to save space.

    Maybe I am missing the obvious.

    Thanks for any advice.



  2. Re: editing programs on hp-50g

    On 7 Mar, 03:29, wobuzhidao wrote:
    > I am still learning about my hp-50g. *I have a question about editing
    > programs. *When I am through editing a program and hit the Enter key
    > to get ready to stor it back into a variable, *a whole *lot of the
    > editing/formatting *is lost. *E..g.,
    >
    > <<
    > 1 100 FOR I
    > * TIME 5 DISP
    > NEXT
    >
    >
    >
    > becomes
    >
    > << 1 100
    > * * *FOR I TIME 5 DISP
    > * * *NEXT
    >
    >
    >
    > or worse. * * Is there a way (besides editing on a different computer
    > in a text editor) to make the program keep the editing I want it to
    > have. *It makes it difficult to edit larger programs because the
    > formating changes. *I presume it does this to save space.
    >
    > Maybe I am missing the obvious.
    >
    > Thanks for any advice.


    One way is to write the program as a string, within quotes ".."
    Keep this string for later editing. To run the program, make a
    copy of the source string and replace the quotes with << and >>.

    "DUP DROP" to <>

  3. Re: editing programs on hp-50g

    On Mar 7, 1:29 pm, wobuzhidao wrote:
    > I am still learning about my hp-50g. I have a question about editing
    > programs. When I am through editing a program and hit the Enter key
    > to get ready to stor it back into a variable, a whole lot of the
    > editing/formatting is lost. E..g.,
    >
    > <<
    > 1 100 FOR I
    > TIME 5 DISP
    > NEXT
    >
    >
    >
    > becomes
    >
    > << 1 100
    > FOR I TIME 5 DISP
    > NEXT
    >
    >
    >
    > or worse. Is there a way (besides editing on a different computer
    > in a text editor) to make the program keep the editing I want it to
    > have. It makes it difficult to edit larger programs because the
    > formating changes. I presume it does this to save space.
    >
    > Maybe I am missing the obvious.
    >
    > Thanks for any advice.


    you are missing the fact that you are using HP4X internal editor which
    has its own set of rules formatting included;

  4. Re: editing programs on hp-50g

    On Mar 7, 5:29 am, wobuzhidao wrote:
    > I am still learning about my hp-50g. I have a question about editing
    > programs. When I am through editing a program and hit the Enter key
    > to get ready to stor it back into a variable, a whole lot of the
    > editing/formatting is lost. E..g.,
    >
    > <<
    > 1 100 FOR I
    > TIME 5 DISP
    > NEXT
    >
    >
    >
    > becomes
    >
    > << 1 100
    > FOR I TIME 5 DISP
    > NEXT
    >
    >
    >
    > or worse. Is there a way (besides editing on a different computer
    > in a text editor) to make the program keep the editing I want it to
    > have. It makes it difficult to edit larger programs because the
    > formating changes. I presume it does this to save space.
    >
    > Maybe I am missing the obvious.
    >
    > Thanks for any advice.


    After you finish editing, your text code is compiled into executable
    code. When you re-edit a program, it is de-compiled back into text
    which you can then edit. Since compiling strips out any formatting
    and comments, these will not be available when re-editing.

    You can edit your text as a string in quotes, such as:
    "
    <<
    1 100 FOR I
    TIME 5 DISP
    NEXT
    >>

    "
    This will preserve the formatting. To compile the string into an
    executable, put a copy of the string on the stack and use the OBJ->
    command.

    Your other option is to start liking the editor's formatting.

    -wes

+ Reply to Thread