using solve app from a program
02-17-2018, 03:05 AM
Post: #1 enriquephilippe Junior Member Posts: 6 Joined: May 2016
using solve app from a program
Hi, this the code i've been struggling with (it's pretty basic)

EXPORT TRX_3()
BEGIN
local a;
STARTAPP(solve);
a:=solve.solve(E1); //here is the problem
print();
print(a);
END;

//variations i tried:
//a:=solve(E1,{X});
//a:=SOLVE(E1,{X});
//a:=Solve(E1,{X});
//a:=Solve.SOLVE(E1,{X});
//a:=solve.SOLVE(E1,{X});
//a:=SOLVE.solve(E1,{X});
//a:=solve(E1);
//a:=SOLVE(E1);
//a:=Solve(E1);
//a:=Solve.SOLVE(E1);
//a:=solve.SOLVE(E1);
//a:=SOLVE.solve(E1);

the content inside E1 is the following: 0.5=(2*E^-3*X)/(1+1*E^-3*X)
and the solution that i get directly from the app is x:333.33
02-17-2018, 03:18 AM
Post: #2
 chromos Member Posts: 189 Joined: Jun 2015
RE: using solve app from a program
I didn't try, but are you sure STARTAPP(solve); is right?

PHP Code:
STARTAPP("Solve");

Geocaching Coords Solver, Number of triangles Puzzle
02-17-2018, 01:25 PM
Post: #3 JMB Member Posts: 97 Joined: Jan 2016
RE: using solve app from a program
In Home, Solve.SOLVE(E1,X) gives the right answer 333.333.

Also, the next program returns the correct answer:
Code:
EXPORT TRX_3() BEGIN   LOCAL a;   a:=Solve.SOLVE(E1,X);   print(a); END;
02-18-2018, 03:35 PM
Post: #4 enriquephilippe Junior Member Posts: 6 Joined: May 2016
RE: using solve app from a program
Thx a lot, actually both observation were accurate, the final code in case someone else need it is the following:

EXPORT using_solve_from_program()
BEGIN
LOCAL a;
//get the equation you want
//to solve inside the slot E1
STARTAPP("Solve");
STARTVIEW(0);
msgbox("make sure the equation you want
to solve is inside the E1 slot");
a:=Solve.SOLVE(E1,X);
print();
print(a);
END;
 « Next Oldest | Next Newest »

User(s) browsing this thread: 1 Guest(s)