HP Forums
42s program question - Printable Version

+- HP Forums (https://archived.hpcalc.org/museumforum)
+-- Forum: HP Museum Forums (https://archived.hpcalc.org/museumforum/forum-1.html)
+--- Forum: Old HP Forum Archives (https://archived.hpcalc.org/museumforum/forum-2.html)
+--- Thread: 42s program question (/thread-228840.html)

42s program question - David Persinger (US) - 08-08-2012

Can someone tell me what function is being referred to when there is |-? in a program listing. I understand the append function |- But what is the question mark following it?


Re: 42s program question - Matt Agajanian - 08-08-2012

Are you speaking of programs here in the MoHPC Software Library?

Re: 42s program question - David Persinger (US) - 08-08-2012

yes. Actual line is.

18 |-?": > "

it is in a program called PRM? for evaluating if a number is prime and putting the factors in a 1xN matrix.

Re: 42s program question - David Persinger (US) - 08-08-2012

This same program uses the test:


I am not sure what this is supposed to be either. If I enter x=y? or x<>y?, the program returns an incorrect response.

Is there a list of programming conventions someplace for when the program step is represented by non-keyboard characters?

for example Rdn vs. Roll down, because there is no down arrow character?

Re: 42s program question - Diego Diaz - 08-08-2012

Hi David,

The "|-" symbol represents the ALPHA append function: whatever is between quotation marks after the "|-" symbol will be appended to the right of the ALPHA register contents.

To get this append character into your program just activate ALPHA mode en hit ENTER key.

Note that in the line 18 |-?": > ", the question mark "?" is a typo?: it must not be entered, just enter 18 |-": > "

x!=y? is the x<>y? sometimes represented as x#y?: Is x different from y?

The "!=" (not equal to) comparison operator is fairly common in early "C" language machines.

Hope this helps.



Edited: 8 Aug 2012, 5:24 p.m.

Re: 42s program question - David Persinger (US) - 08-09-2012

Thanks Diego.

I figured the ? was a typo. I tried not equal to for != but the program didn't work. But I was able to figure out which inequality test does.

Thanks for the response!