A: |
There are a lot of methods for doing this.
The most obvious method to do this is usage of a function like this one:
void progrun(const char *name)
{
char fname[25];
HANDLE h;
strcpy (fname, name);
strcat (fname, "()");
push_parse_text (fname);
h = HS_popEStack ();
TRY
NG_execute (h, FALSE);
FINALLY
HeapFree (h);
ENDFINAL
}
The usage of it is straightforward, for example:
progrun ("testprog");
Note that the program you call may throw errors. If you understand this function, you can easily expand it
to accept arguments, etc. Principally, using NG_execute
you can execute any particular sequence of TI-Basic statements.
|