How do I write a formula and don't execute it

racing01's picture

I don't know if it's clear, but what I want is write a formula  ...And I'd like it to treat it as Text not math (I don't want Maple to execute it, of course appears an error message if so)

Tim Vrablik's picture

A couple of options

To switch between text and math you can press F5 (or use the buttons on the top of the screen).  In general, if you sype in your math and switch into textmode (F5) then press enter, your math will not be executed.

For code, if you have lines you don't want to execute, you can press shift+enter and it will not execute the line.

racing01's picture

Thanks for answering, I get

Thanks for answering, I get what you say......my thing is (apart that it's my first week with maple) that when I press the "!!!" button to execute the entire worksheet, it executes the one I don't want to. I attach a file. (I'd like Maple to consider the formula as text)

View 9175_question.mw on MapleNet or Download 9175_question.mw
View file details

By the way. I'm creating a document in which I have defined a lot of variables......When I close Maple and re-open the document, then, when I want to go on working with the already defined variables I have to execute everything again....the question if is I'm doing things well or I'm missing something.

Thanks very much for your help!!

 

Scott03's picture

!!! Execution

When you press the !!!, Maple will execute everything that was executed before.  If you had gone to the next line without executing the Math, then it will not try to execute again until you press enter on the line.  You can go to the next line without executing what is on it by clicking the down arrow if you have lines after the current line or by pressing Ctrl+Shift+J (also done by going to Insert > Paragraph > After cursor) which will add a line after the cursor.

To fix the case where some math was accidentally executed, I have seen removing the Document Block containing the Math to work.  In you case the easiest solution is to add a line after the current one, highlight the text and Math Input and drag it to the new line you just created (either before or after this line).  Once you have moved everything, you can delete the old line and make sure not to click enter on that line.

For you other question about needing to redefine variables each time, I would suggest just making sure that you click the !!! each time you open the worksheet.  You can set code to be executed automatically each time you or anyone opens the worksheet, but I find it may lead to unexpected results if you forget to assign a certain line as autoexecutable.

 

Scott

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
}