Poll: Would you use two kinds of PRINT?
Yes
No
[Show Results]
Note: This is a public poll, other users will be able to see what you voted for.
Post Reply 
Another Wishlist Item
03-28-2015, 05:30 PM (This post was last modified: 03-28-2015 09:10 PM by toml_12953.)
Post: #1
Another Wishlist Item
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.

Tom L
Cui bono?
Find all posts by this user
Quote this message in a reply
03-28-2015, 06:08 PM (This post was last modified: 03-28-2015 06:44 PM by compsystems.)
Post: #2
RE: Another Wishlist Item
+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.
Find all posts by this user
Quote this message in a reply
03-29-2015, 03:51 PM
Post: #3
RE: Another Wishlist Item
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.
Find all posts by this user
Quote this message in a reply
03-30-2015, 01:45 PM
Post: #4
RE: Another Wishlist Item
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
Visit this user's website Find all posts by this user
Quote this message in a reply
03-30-2015, 02:26 PM (This post was last modified: 03-30-2015 02:27 PM by toml_12953.)
Post: #5
RE: Another Wishlist Item
(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

Tom L
Cui bono?
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)