The following warnings occurred:
Warning [2] Undefined array key 254389 - 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 254392 - 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 254420 - 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 254506 - 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 254506 - 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 254420 - 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 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





HP Prime variables



#2

Hello,

I have two programs and need help in programming. The first is the calculation of total hardness in water. The second is the total number of cations present in this water. As I describe below:

1st program:

EXPORT DTotal;
EXPORT Dureza_Total(Ca,Mg)
BEGIN
DTotal:=Ca*2.49+Mg*4;
END;

2st program:

EXPORT Cátions;
EXPORT TCátions(Fe3,Fe2,H,NH,Na,K,Cu,Zn,Al,Cr,Ca,Mg)
BEGIN
RETURN Dureza_Total(Ca,Mg)+Fe2*1.79+Fe3*2.69+H*50+NH*2.78+Na*2.17+K*1.28+Cu*1.57+Zn*1.53+Al*5.56+Cr*2.89▶Cátions;
END;
END;

When I run this program pops up the error: “TCátios Error: Invalid input”.
If you decrease the amount of variables, for example, from 12 to 10, the program works. This same program in 50 g works without problem. There is no solution or other alternatives?

Thank You

David


#3

Make more then one EXPORT command,

that is, break up your variables into two back to back EXPORT statements.

it seems there is an upper limit of the number of variables that one is able to place in and EXPORT (variables) statement. so I do this:

//declare variables.

EXPORT IN,OUT,NUM,EQL,TIM;
EXPORT OFA,OFB,ONA,ONB;
EXPORT TOA,TOB,CAA,CAB;
EXPORT SHA,SHB,LGA,LGB;
EXPORT WTA,WTB,WTC;

i went nuts but there was a reason. Firstly all the variables declared in a single EXPORT did not work. Since I have 5 subroutines i broke up the declaration into 5 EXPORT commands for easy editing. Each command set of variables applies to one subroutine.

cheers, geoff


try:

EXPORT TCátions()
EXPORT (Fe3,Fe2,H,NH,Na,K);
EXPORT (Cu,Zn,Al,Cr,Ca,Mg);


Edited: 30 Oct 2013, 9:11 p.m.


#4

Hello my friends:

Thanks for the help, but it didn't work. I wonder if you can't demonstrate with a concrete programme that uses and functions that have more than 12 variables? I will test it and check if it works on my machine.

Thank you in advance.

David

#5

Hello,

There is a limit to the number of parameters that a funciton can take. This limit is 16 parameters.

EXPORT and LOCAL are functions, so they have a 16 parameter limit... However, there is a subtelty there. EXPORT/LOCAL is really
EXPORT(var, value, var, value..., var, value)
this means that 1 EXPORT or LOCAL is limited to 8 variables definitions at a time.

however, USER functions can have up to 16 input parameters, so your function should be OK.

example:

EXPORT Dureza_Total(Ca,Mg)
BEGIN
return Ca*2.49+Mg*4;
END;


EXPORT TCátions(Fe3,Fe2,H,NH,Na,K,Cu,Zn,Al,Cr,Ca,Mg)
BEGIN
RETURN Dureza_Total(Ca,Mg)+Fe2*1.79+Fe3*2.69+H*50+NH*2.78+Na*2.17+K*1.28+Cu*1.57+Zn*1.53+Al*5.56+Cr*2.89;
END;

cyrille


Possibly Related Threads…
Thread Author Replies Views Last Post
  HP: Dump the predefined variables! bluesun08 12 3,645 11-19-2013, 02:18 PM
Last Post: bluesun08
  HP Prime - local variables retain their initial type BruceH 4 1,811 11-10-2013, 12:42 PM
Last Post: Michael de Estrada
  Shutdown with the Apps key and more than 10 variables in a program. Davi Ribeiro de Oliveira 10 3,744 11-05-2013, 01:26 PM
Last Post: Han
  HP Prime: Number of external Variables Davi Ribeiro de Oliveira 0 971 11-01-2013, 08:10 PM
Last Post: Davi Ribeiro de Oliveira
  HP Prime - deleting variables bluesun08 1 1,186 10-29-2013, 06:36 PM
Last Post: Joe Horn
  HP Prime: CAS Variables - -How to save? Helge Gabert 2 1,748 10-27-2013, 11:26 PM
Last Post: Helge Gabert
  HP Prime Solver Variables Issue Anibal Morones Ruelas 8 2,982 10-19-2013, 09:45 AM
Last Post: Harold A Climer
  Prime RPN storing variables kris223 3 1,675 09-19-2013, 03:49 PM
Last Post: kris223
  local variables brooky 9 2,564 09-25-2012, 12:25 AM
Last Post: David Hayden
  Symbolic limit of a function of 2 variables, HP49/50 Gilles Carpentier 0 838 08-26-2012, 10:28 AM
Last Post: Gilles Carpentier

Forum Jump: