HP Forums

Full Version: Another Wishlist Item
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I'd like to see two kinds of PRINT function: One that adds a CRLF (as it does now) and another one that doesn't so the next PRINT will continue on the same line (with wrapping if it goes past the right margin, of course.) BASIC ends a PRINT with a CRLF unless you end it with a semi-colon. I'd like to see something like this in HPPL. If I can only have one or the other, I'd like to suppress the CRLF and add \n when I need a new line.
+1 Super important. in almost all languages there

I think I found a problem with the PRINT CMD in lower case
/////////////////////

in simplify: MAXIMUM OR NONE AND COMMAND IN CAPS (PRINT HOME CMD)
_______
4√(-16) [enter]
¯¯¯¯¯¯¯
=> (1+i)*√(2)

PRINT( 4√(-16) ) [enter] => 1.41421356237+1.41421356237*i OK

////////////////

in simplify: NONE AND COMMAND IN LOWER CASE (print CAS CMD)

ENTRY LINE
_______
4√(-16) [enter]
¯¯¯¯¯¯¯
(4 NTHROOT -16) =>
((√(2)/2)+((i)*√(2)/2))*16^(1/4) OK

print( 4√(-16) ) [enter] => ((√(2)/2)+((i)*√(2)/2))*16^(1/4) OK

/////////////////////

in simplify: MAXIMUM
_______
4√(-16) [enter]
¯¯¯¯¯¯¯
=> (1+i)*√(2)

print( 4√(-16) ) [enter] => ((√(2)/2)+((i)*√(2)/2))*16^(1/4) ignores the flag =~[ (simplify : MAXIMUM)

/////////////////

also is require in pretty print, Please include this also in the survey, the 1996 ti68k calculators have it

PS: the help of the calculator is incomplete, needless to mention the print command in lowercase, these small details make the public to stay away from using the calculator, it ignores how it works.
On the Prime, autosimplification is applied on the answer (except if the toplevel command is not to be autosimplified like for example factor). The value returned by print is 0 or 1 (it has nothing to do with what you see in the terminal, printed values inside a function are different from the returned value of a function), therefore nothing happens. If you want to see the argument of print simplified in some way, you have to call the simplify or regroup function explicitly.
If the TI returns different answers, it's probably because expressions are always rewritten. On the Prime, the same could be done by calling the autosimplification on arguments of print. But I don't think it's a good idea, it's better to leave the choice to the user.
The current PRINT command can be improved by inserting a "next line" character, like a semicolon in between quotes.

Example:

PRINT("Hello";"I'm Eddie"); RETURNS

Hello
I'm Eddie
(03-30-2015 01:45 PM)Eddie W. Shore Wrote: [ -> ]The current PRINT command can be improved by inserting a "next line" character, like a semicolon in between quotes.

Example:

PRINT("Hello";"I'm Eddie"); RETURNS

Hello
I'm Eddie
The manual says \n inserts a new line character in a string but it doesn't work in a PRINT string. I wonder why not. If you press Enter while typing the PRINT string, it works. The line in a program is listed as:

Code:
PRINT("Hello
I'm Eddie");

Tom L
Reference URL's