How do I make a line break in Maple?

resolvent's picture

In Math Mode in a Maple worksheet,
how do I type something such as

L := [1, 2, "abc", "a", 7.0, infinity];
for x in L do
if type(x, 'string') then
print(x);
break
end if
end do

on multiple lines?

Also, please show me in the online Help menu
the explanation for how one makes such line breaks
without setting off execution.

I got Maple last August. I have searched the online Help
menu for any mention of a line break but have not found it.

Thank you.

Comments

acer's picture

Shift-Enter

Hit Shift and Enter at the same time.

See the help-page, ?shortcut_keys,windows

acer

resolvent's picture

Thank you!

I kept searching "line break" in the Help menu,
but all I got back was No Matches found.
I knew a search for keyword "break"
would yield references only to the
flow-control statement "break",
not a "line break".

Also, under
Basic Features > Mathematics > 2-D Math
> Hints and Shortcut Keys

I do not see reference to a soft line break
or the Shift Enter keystroke you mentioned.
I tried it and it works. But, everything that
works, I need to see referenced in the Help
Menu.

Again, thank you to all who responded!

acer's picture

understandable confusion

The confusion is quite understandable. The Shift-Enter shortcut is not specific to 2D Math input.

acer

Doug Meade's picture

?hotwin

What you are requesting is sometimes referred to as a "soft line break". If I do a text search for "soft break", the first entry shows the help for worksheet,reference,hotwin. In the second group of keyboard bindings the first entry is:

Shift + Enter       Soft New Line

So, enter your lines as you wrote them, but with a Shift+Enter at the end of each line and you will see that all commands are in the same execution group. Everything will be executed as soon as you press the Enter key.

The use of Shift+Enter for a soft break is pretty common.

I hope this is useful,

Doug

---------------------------------------------------------------------
Douglas B. Meade
Math, USC, Columbia, SC 29208  E-mail: mailto:meade@math.sc.edu       
Phone:  (803) 777-6183         URL:    http://www.math.sc.edu/~meade/

Comment viewing options

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