X-Git-Url: https://www.ginac.de/ginac.git//ginac.git?p=ginac.git;a=blobdiff_plain;f=cint%2Fginaccint.bin.cpp;h=38d3daee07949c848bf46c780c2a1340bf8d881d;hp=b903ca68c483a37a85d4c566b46cc9d9f23a48a2;hb=06a2f420f295976355884d8eb2de5ae79f90c1bc;hpb=0cc840f49d87e01b31ad5a848a8bf5470ea43275;ds=sidebyside diff --git a/cint/ginaccint.bin.cpp b/cint/ginaccint.bin.cpp index b903ca68..38d3daee 100644 --- a/cint/ginaccint.bin.cpp +++ b/cint/ginaccint.bin.cpp @@ -115,6 +115,7 @@ void process_tempfile(string const & command) { #ifdef OBSCURE_CINT_HACK static G__value ref_symbol = exec_tempfile("symbol ginac_cint_internal_symbol; ginac_cint_internal_symbol;"); + static G__value ref_constant = exec_tempfile("constant ginac_cint_internal_constant; ginac_cint_internal_constant;"); static G__value ref_function = exec_tempfile("sin(ginac_cint_internal_symbol);"); static G__value ref_power = exec_tempfile("power(ex(ginac_cint_internal_symbol),ex(ginac_cint_internal_symbol));"); static G__value ref_numeric = exec_tempfile("numeric ginac_cint_internal_numeric; ginac_cint_internal_numeric;"); @@ -151,12 +152,14 @@ void process_tempfile(string const & command) +"LAST="+varname+";\n" +"cout << \""+varname+" = \" << "+varname+" << endl << endl;"); } else if (TYPES_EQUAL(retval,ref_symbol)|| + TYPES_EQUAL(retval,ref_constant)|| TYPES_EQUAL(retval,ref_function)|| TYPES_EQUAL(retval,ref_power)|| TYPES_EQUAL(retval,ref_numeric)) { if (!basic_type_warning_already_displayed) { - cout << "WARNING: The return value of the last expression you entered was a symbol," << endl - << "function, power or numeric, which cannot be safely displayed." << endl + cout << endl + <<"WARNING: The return value of the last expression you entered was a symbol," << endl + << "constant, function, power or numeric, which cannot be safely displayed." << endl << "To force the output, cast it explicitly to type 'ex' or use 'cout'," << endl << "for example (assume 'x' is a symbol):" << endl << PROMPT "ex(x);" << endl