HP Forums

Full Version: Request: "Done" instead of 0
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello
In a presentation of computer algebraic systems, I show the difference between numerical and symbolic languages

Sample
PHP Code:
#include<stdio.h>
int main() {
    
printf("%f",x+1);
    return 
0;

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;
    return 
0;

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

try
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.
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.
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?

Thanks
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"™.
Reference URL's