The following warnings occurred:
Warning [2] Undefined array key 254542 - Line: 275 - File: inc/plugins/threaded_mode.php PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php 275 errorHandler->error_callback
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Undefined array key 254543 - Line: 275 - File: inc/plugins/threaded_mode.php PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php 275 errorHandler->error_callback
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Undefined array key 254551 - Line: 275 - File: inc/plugins/threaded_mode.php PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php 275 errorHandler->error_callback
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Undefined array key 254564 - Line: 275 - File: inc/plugins/threaded_mode.php PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php 275 errorHandler->error_callback
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Undefined array key 254567 - Line: 275 - File: inc/plugins/threaded_mode.php PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php 275 errorHandler->error_callback
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Undefined array key 254572 - Line: 275 - File: inc/plugins/threaded_mode.php PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php 275 errorHandler->error_callback
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Undefined array key 254584 - Line: 275 - File: inc/plugins/threaded_mode.php PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php 275 errorHandler->error_callback
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Undefined variable $thread - Line: 295 - File: inc/plugins/threaded_mode.php PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php 295 errorHandler->error_callback
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Trying to access array offset on value of type null - Line: 295 - File: inc/plugins/threaded_mode.php PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php 295 errorHandler->error_callback
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Undefined variable $fid - Line: 295 - File: inc/plugins/threaded_mode.php PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php 295 errorHandler->error_callback
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Undefined array key 254551 - Line: 331 - File: inc/plugins/threaded_mode.php PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php 331 errorHandler->error_callback
/inc/plugins/threaded_mode.php 332 ThreadedMode::buildtree
/inc/plugins/threaded_mode.php 332 ThreadedMode::buildtree
/inc/plugins/threaded_mode.php 304 ThreadedMode::buildtree
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Undefined array key 254567 - Line: 331 - File: inc/plugins/threaded_mode.php PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php 331 errorHandler->error_callback
/inc/plugins/threaded_mode.php 332 ThreadedMode::buildtree
/inc/plugins/threaded_mode.php 332 ThreadedMode::buildtree
/inc/plugins/threaded_mode.php 332 ThreadedMode::buildtree
/inc/plugins/threaded_mode.php 304 ThreadedMode::buildtree
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Undefined array key 254584 - Line: 331 - File: inc/plugins/threaded_mode.php PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php 331 errorHandler->error_callback
/inc/plugins/threaded_mode.php 332 ThreadedMode::buildtree
/inc/plugins/threaded_mode.php 332 ThreadedMode::buildtree
/inc/plugins/threaded_mode.php 332 ThreadedMode::buildtree
/inc/plugins/threaded_mode.php 332 ThreadedMode::buildtree
/inc/plugins/threaded_mode.php 304 ThreadedMode::buildtree
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Undefined variable $theme - Line: 3 - File: inc/plugins/threaded_mode.php(305) : eval()'d code PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php(305) : eval()'d code 3 errorHandler->error_callback
/inc/plugins/threaded_mode.php 305 eval
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Trying to access array offset on value of type null - Line: 3 - File: inc/plugins/threaded_mode.php(305) : eval()'d code PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php(305) : eval()'d code 3 errorHandler->error_callback
/inc/plugins/threaded_mode.php 305 eval
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Undefined variable $theme - Line: 3 - File: inc/plugins/threaded_mode.php(305) : eval()'d code PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php(305) : eval()'d code 3 errorHandler->error_callback
/inc/plugins/threaded_mode.php 305 eval
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Trying to access array offset on value of type null - Line: 3 - File: inc/plugins/threaded_mode.php(305) : eval()'d code PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php(305) : eval()'d code 3 errorHandler->error_callback
/inc/plugins/threaded_mode.php 305 eval
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Undefined variable $lang - Line: 5 - File: inc/plugins/threaded_mode.php(305) : eval()'d code PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php(305) : eval()'d code 5 errorHandler->error_callback
/inc/plugins/threaded_mode.php 305 eval
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Attempt to read property "messages_in_thread" on null - Line: 5 - File: inc/plugins/threaded_mode.php(305) : eval()'d code PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php(305) : eval()'d code 5 errorHandler->error_callback
/inc/plugins/threaded_mode.php 305 eval
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks





Help with PPL.



#3

Sorry if this has already been asked. In PPL, I am unable to clear the screen before each program run. RECT(); appears to do nothing to the 'console'. For example, from memory (emulator is at work):

EXPORT TEST();
RECT();
PRINT("Hello World");
FREEZE;
END

The result, in the 'console window', after subsequent RUNs, is:

Hello World
Hello World
Hello World
Hello World
Hello World

I thought RECT() would clear the screen. Looking for a CLEAR or NEW or DRAW(-1) command…

Regards.

Edited: 1 Nov 2013, 1:39 a.m.


#4

Quote:
Sorry if this has already been asked. In PPL, I am unable to clear the screen before each program run. RECT(); appears to do nothing to the 'console'. For example, from memory (emulator is at work):

EXPORT TEST();
RECT();
PRINT("Hello World");
FREEZE;
END

The result, in the 'console window', after subsequent RUNs, is:

Hello World
Hello World
Hello World
Hello World
Hello World

I thought RECT() would clear the screen. Looking for a CLEAR or NEW or DRAW(-1) command…

Regards.



RECT() clears the "current" screen (which is the G0 graphic variable). PRINT() draws to a different screen. I don't know which, off the top of my head.


#5

Hello,
In order to clear the terminal window from previous program run you have to add another PRINT() command like this:


EXPORT TEST();

// the next print clear the terminal window

PRINT();

PRINT("Hello World");

FREEZE;

END

Hope it helps,

Giancarlo

Edited: 1 Nov 2013, 6:24 a.m.

#6

The terminal is a special window for text messages. It is created on startup and remains hidden. When it pops up, it covers whatever is behind. Pressing ON-T (together) will bring the terminal up at any point.

Like has been said, PRINT() is the equivalent of RECT_P() and is what is used to clear the terminal.

Note that the terminal is really just meant as a convenient place to display text in a temporary way. The information there is not saved, is frequently cleared, and there is no way to get text out of it.

TW

Edited: 1 Nov 2013, 10:20 a.m.


#7

Quote:
The terminal is a special window for text messages. It is created on startup and remains hidden. When it pops up, it covers whatever is behind. Pressing ON-T (together) will bring the terminal up at any point.
TW

sorry for my bad English

>> (Pressing [ON]+[T] == terminal view) in the computer software "HP-Prime virtual" does not happens, should be fixed this BUG in future updates

Quote:
Note that the terminal is really just meant as a convenient place to display text in a temporary way. The information there is not saved, is frequently cleared, and there is no way to get text out of it.

the term (terminal) means input / output data in the future must support data input, otherwise you should rename 'TERMINAL VIEW' to 'OUT VIEW' or something

The series ti89/v200/92+ has a terminal view that no calculator has surpassed

much better if you could somehow keep this information without deleting terminal, besides retrieved by a command

showTerminalView

[request for HP-Prime TEAM]

new commands as last generation software that exceeds the primitive calculators (ti89/v200/92+): showTerminalView & readLine for terminal view ~ readln (PASCAL)

program algoritmo;
uses crt;

var hora_1, hora_2, minuto_1, minuto_2, segundo_1, segundo_2, horas, minutos, segundos : integer;
var tecla : char;
begin
write ('Ingrese el valor de hora 1: ');
readln (hora_1);
write ('Ingrese el valor de hora 2: ');
readln (hora_2);
write ('Ingrese el valor de minuto 1: ');
readln (minuto_1);
write ('Ingrese el valor de minuto 2: ');
readln (minuto_2);
write ('Ingrese el valor de segundo 1: ');
readln (segundo_1);
write ('Ingrese el valor de segundo 2: ');
readln (segundo_2);
segundos := ((hora_2-hora_1)*60+minuto_2-minuto_1)*60+segundo_2-segundo_1;
minutos := (segundos-segundos mod 60) div 60;
horas := (minutos-minutos mod 60) div 60;
minutos := minutos mod 60;
segundos := segundos mod 60;
writeln ('Valor de horas: ', horas);
writeln ('Valor de minutos: ', minutos);
writeln ('Valor de segundos: ', segundos);
writeln;
write ('Presione una tecla para terminar . . . ');
tecla := readkey;
end.

Edited: 1 Nov 2013, 10:53 a.m.

#8

Terminal is a very convenient way to display text. Many programmers start their days programming in a text editor then see their RUN results in a terminal window. For many programs this is not only convenient it is so simple it is desired. Do we need to get elaborate with our output if the program is a simple routine?

I know this is a very general question, but for simple programs what is the recommended output display method?

Regards.


#9

with readLine command on the terminal screen would read data

simulating an input


EXPORT Deducir_Numero2()
// port (version 0.0.3) to HP-Prime by compSystems, source code original by PABLO. coder ZINJAI, PSEINT : http://pseint.sourceforge.net
begin
print();
print( "*** Ejecución Iniciada. ***");
freeze; wait;
local num_ingresado:=0;
local total_intentos:=8;
local num_secreto:= ( rand() mod 100 ) + 1;

print("Adivine el numero (de 1 a 100)");
print("Ingrese el # de intentos");
freeze; wait(2);
if NOT(input(total_intentos,"Total de Intentos","Intentos=","Digite un # como total de intentos")) then kill; end;
print(">"+total_intentos);
local intentos:=total_intentos;
print("Debug: "+num_secreto);

if NOT(input(num_ingresado,"Deducir_Numero","Num Ingresado=","Digite un #")) then kill; end;
print(">"+num_ingresado);
while num_secreto <> num_ingresado and intentos>1 do

if num_secreto>num_ingresado then
print("Muy bajo");
else
print("Muy alto");
end;
intentos:=intentos-1;
print("Le quedan "+intentos+" intento(s):");
freeze; wait;
if NOT(input(num_ingresado,"Deducir_Numero","Num Ingresado=","Digite un #")) then kill; end;
print(">"+num_ingresado);
end;

if num_secreto <> num_ingresado then
print("El numero era: "+num_secreto);
else
print("Exacto! Usted adivino en: "+ ((total_intentos+1)-intentos) +" intento(s.)");
end;
print("*** Ejecución Finalizada. ***");

freeze;
return "Done";

end;


Possibly Related Threads…
Thread Author Replies Views Last Post
  My first HP Prime PPL Program Michael de Estrada 9 2,516 10-19-2013, 02:32 PM
Last Post: Michael de Estrada

Forum Jump: