HP Forums
Request: "Done" instead of 0 - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html)
+--- Forum: HP Prime (/forum-5.html)
+--- Thread: Request: "Done" instead of 0 (/thread-11274.html)

Request: "Done" instead of 0 - compsystems - 08-26-2018 12:56 PM

In a presentation of computer algebraic systems, I show the difference between numerical and symbolic languages

PHP Code:
int main() {

output: error: 'x' was not declared in this scope

PHP Code:
#include <iostream>
using namespace std;

int main(int argcchar *argv[]) {
cout << 4/3+1/<< endl;

output: 1

in the hp-prime
print(4/3+1/3) [enter] show 5/3 ok
but then [esc] show 0 ?

in c++ the output return 0; but the CAS is not c/c++, for this reason this generates confusion on history view, when run the hp-prime in a classroom or you want to take a screenshot

print(4/3+1/3) -> 0

Please HP-team return the word "Done" (history view) instead of the number 0 or best the last printing statement

print(4/3+1/3) [enter] show 5/3 ok
but then [esc] -> 5/3

The following screenshot shows the problem by showing zero the sum of the numbers 4/3+1/3.

RE: Request: "Done" instead of 0 - Tim Wessman - 08-26-2018 01:25 PM

We've been over this for about 5 years now. This does not improve clarity in any way and simply makes the lives of anyone trying to test output difficult. You constantly want to be converting things into strings, error messages and other things that don't belong there.

I'm sorry if you feel otherwise, but apart from you I've not ever heard a single person complaining in this direction. No educator, no instructor, and noone doing development.

RE: Request: "Done" instead of 0 - compsystems - 08-26-2018 01:58 PM

this request to replace 0 -> last expression of print, it is so simple that it would take a few seconds to change the code, above I explain the cause and effect of this change, it is not because I want it but it gives clarity.

Anyone else that supports my request?


RE: Request: "Done" instead of 0 - ijabbott - 08-27-2018 09:45 AM

The text written by PRINT(Expr) is a "side effect" of the function, and need not be related to its return value. Giac currently chooses to return 0. The print() function in Python chooses to return None. The printf() function in C chooses to return the number of characters written. There is no "One True Way"™.