segfault

40 Reputation

3 Badges

1 years, 64 days

MaplePrimes Activity


These are replies submitted by segfault

@tomleslie  tha hard way ????
It is one line with two simple commands.
1. Read the file with readbytes

2. Use the parse command to execute the code.

Sheesh !??

BTW the problem is marked as solved.

@acer 
What you address is not part of the problem. I dont have a problem with readbytes. It works perfectly.

I also didnt ask for help with readbytes, but how to parse strings in maple when read from file.

Probhlem is solved.

@acer 
I am currently using readbytes and it works perfectly and I get the entire filecontent as a string.

Readln is insane to use in this case. Just reading line by line is absurd. Why do I have to create aloop for readln and a join function when readbytes does it dor me in one command ?

read just doesnt even work in this case.

Sorry, that is just not right.

readbytes and parse works perfectly and user "parse" solved the problem.

@tomleslie 
Way better to use readbytes than readln. Else with readline (same as in pascal) I have to write a loop and then join together the results to get the entire file content.
I also cannot use xmaple, as all processes are started from a bash script and all the files run concurrently on 64 cores. So File-Save is moot. So only cli-maple can be used.

Also, the favorite editor thing is for window$.  On Linux emacs e.g. opens anything you throw at it and does not necessarily care about extensions.

Anyway, thanks for the answer, but it was already answered.

@Kitonum 
Thanks I'll go read up.

Found that the following works
parse(VAR_ContainingString,statement);

The manual has been pretty useless to me. Very difficult to find trivial basic stuff.
Forum is way more useful.

Thank you very much for the solution

@mmcdara 

Thank you.

Refreshing to get a straight  answer to the question and not a lot of pretensious snark.

You sure did understand the question.

I will work through your examples and see if I can apply it to my problem.
Very helpful thanks.

@tomleslie 

It is fine if you do not understand the problem.

It is also good practice and corteous not to reply with a solution if you do not understand a problem, right ?

Please be kind and let someone else who understands the problem respond

The question is well posed with a clear example.

thanks

1 2 Page 2 of 2