I read a string from file which contains a sequence of Maple commands, all in one string. The commands are separated by ";" in the string. I need to then evaluate all the commands in the string as if I typed them one after the other.
Here is an example
data:="x:='x';y:='y';sol:=dsolve(diff(y(x),x)=1,y(x));"; #read from database
Warning, extra characters at end of parsed string
x := 'x'
I want the result to parse to be as if I typed
I looked at help in parse page, but I do not see what I need to do. It says that
If the option 'statement' is specified, the string must consist of exactly one Maple statement (which includes expressions). The statement is parsed and evaluated, and the result is returned.
But I am not using the statment option. I also tried using this option, no change, same problem.
Is there a way to prase such a string?