premature end of input: unterminated loop - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : System : Error Message Guide : premature end of input: unterminated loop

Warning, premature end of input , use <Shift> + <Enter> to avoid this message.

Error, unterminated loop

Error, unterminated for loop

 

Description

Examples

Description

To enter multiline inputs without generating warnings, press the Shift+Enter keys.  This produces another line in the same input region.

Examples

Example 1: With 1-D Math input, the warning message premature end of input occurs.

for i from 1 to 5 do f(i)

Warning, premature end of input, use <Shift> + <Enter> to avoid this message.

Solution: Use the Shift+Enter keys.

for i from 1 to 5 do
f(i)
end do;

f1

f2

f3

f4

f5

(2.1)

Example 2: With 2-D Math input, the error message unterminated loop occurs.

for i from 1 to 5 do fi

Error, unterminated loop

Solution: Use the Shift+Enter keys.

for i from 1 to 5 dofiend do&semi;

f1

f2

f3

f4

f5

(2.2)

Example 3

Sometimes you may see this error if you inadvertently hit Enter before you finish the input.  This example is missing the right parenthesis:

sin(Pi

Warning, premature end of input, use <Shift> + <Enter> to avoid this message.

To fix the problem, simply complete the input expression. Here, the matching parenthesis needs to be added:

sin&pi;

0

(2.3)

See Also

for..while...do

if

separator

1-D versus 2-D Math