HP Prime variables - Printable Version +- HP Forums (https://archived.hpcalc.org/museumforum) +-- Forum: HP Museum Forums (https://archived.hpcalc.org/museumforum/forum-1.html) +--- Forum: Old HP Forum Archives (https://archived.hpcalc.org/museumforum/forum-2.html) +--- Thread: HP Prime variables (/thread-254389.html) |
HP Prime variables - Davi Ribeiro de Oliveira - 10-30-2013 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; 2st program:
EXPORT Cátions;
When I run this program pops up the error: “TCátios Error: Invalid input”. Thank You
David
Re: HP Prime variables - Geoff Quickfall - 10-30-2013 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. 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
EXPORT TCátions() Edited: 30 Oct 2013, 9:11 p.m.
Re: HP Prime variables - cyrille de Brébisson - 10-31-2013 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 however, USER functions can have up to 16 input parameters, so your function should be OK. example:
EXPORT Dureza_Total(Ca,Mg)
cyrille
Re: HP Prime variables - Davi Ribeiro de Oliveira - 10-31-2013 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
|