Error, empty script base - Maple Programming Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : System : Error Message Guide : emptyscriptbase

Error, empty script base

Error, invalid base

 

Description

Examples

Description

These are 2-D math parser errors. They occur when you attempt to execute an expression that has a superscript or subscript with no base.

 

Tip: If an expression is executed accidentally, it can lead to error messages (if it is not valid Maple syntax). If this happens, toggling the expression to nonexecutable math removes the error message and changes the math to nonexecutable. To change an expression to nonexecutable math use the shortcut key Shift + F5.  For more information, see Executable and Nonexecutable Math or example 4a below.

Examples

Example 1

b+x2

Error, empty script base

 

This error occurred because the b exponent is not attached to a base. To create this error, you must actively go back after creating the exponent and erase the base. Using standard keystroke or palette entry, the base is included before a superscript or subscript can be added.

 

Solution:

To fix this error, ensure that any superscripts or subscripts are attached to a base.

xb+x2

xb+x2

(2.1)

Example 2

bx5

Error, empty script base

In this example, a subscript is missing the required base.

 

Solution:

To fix the error, ensure the subscript is attached to a base.

xbx5

x5+xb

(2.2)

 

Example 3

x2 b

Error, invalid base

This is the same type of error, but the missing base for the superscript b is found inside the expression. The 2-D math parser returns a slightly different error, because it is interpreting the superscript as a base, which is invalid.

 

Solution:

Just like the "empty script base" error, you must ensure that any superscripts or subscripts include a valid base.

x2xb

x2xb

(2.3)


Example 4a - Expression in text

To write an expression but not execute it, you can use nonexecutable math.  That can help avoid parsing errors for expressions.  For example, suppose you want to write Radium-229 in isotope notation in text, either in a paragraph (or in a plot—see Example 4b).

As a first attempt, write a^229 Ra and then delete a.  If executed, this gives a parsing error.

Radioactive Decay of 229Ra

Error, empty script base

Solution 1

Change the expression to nonexecutable math: click the expression, and use the shortcut key Shift + F5.  The error message is removed. For more information, see Executable and Nonexecutable Math.

Radioactive Decay of 229Ra


Solution 2

Use the Layout palette element Ab or use the shortcut key for pre-superscript.  

Radioactive Decay of Ra229

 

Example 4b - Expression in text in a plot

Now suppose you want to write use Radium-229 in text in a plot, perhaps as a title or in a legend.

(This example is based on one from the MaplePortal/ChemicalIsotope help page.)

λ  0.693evalfScientificConstants:-ElementRa229, halflife;

λ0.002887500000

(2.4)

plotⅇλt,t=0..2 103,labels=Time (s),Activity,title=typesetRadioactive Decay of ,229Ra

Error, invalid base

 

Solution

Use the Layout palette or use the shortcut key for pre-superscript to get an expression which doesn't have parsing issues.

plotⅇλt,t=0..2 103,labels=Time (s),Activity,title=typesetRadioactive Decay of ,Ra229

For more tips on fixing parsing errors in text in a plot, including using atomic identifiers, see Typesetting in Plots.

See Also

2-D Math Shortcut Keys

Executable and Nonexecutable Math

Quick Help

Typesetting in Plots