Skip navigation
3825 Views 4 Replies Latest reply: Dec 22, 2010 10:14 PM by ValeryOchkov RSS
NeatMachine Copper 12 posts since
Dec 20, 2010
Currently Being Moderated

Dec 22, 2010 3:45 PM

This Expression Redefines a Previously Defined Variable

Hello,

I am working in MathCad 11.  I define a variable "x:=10".  Further down the worksheet, I wish to change this variable to "x:=20" for example.  When I do so, MathCad underlines the variable with a green zigzag line which tell me that "This Expression Redefines a Previously Defined Variable."  The subsequent calculation use the later value, but the page has these annoying green zigzag lines.

 

Is there a way to eliminate these zigzag lines?

Thanks.

  • StuartBruff Platinum 4,739 posts since
    Jun 1, 2007

    David Guza wrote:

     

    Hello,

    I am working in MathCad 11.  I define a variable "x:=10".  Further down the worksheet, I wish to change this variable to "x:=20" for example.  When I do so, MathCad underlines the variable with a green zigzag line which tell me that "This Expression Redefines a Previously Defined Variable."  The subsequent calculation use the later value, but the page has these annoying green zigzag lines.

     

    Is there a way to eliminate these zigzag lines?

    Thanks.

     

    Yes.   Menu Tools/Preferences.  Select the 'Warnings' tab, then unselect User Defined - Scalar Variables - plus any other options you want.

     

     

    An important point to note about Mathcad is that, due to the way it works, each definition creates a new variable of the same name.  If you, say define, x:=1 at the top of the page and x:=2 in the middle, then you can add expressions that make use of the original definition in top half of the page at any subsequent time and they will pick up the x=1 value.   The warning feature is there as an aid.

     

    Stuart

  • MikeArmstrong Diamond 4,156 posts since
    Dec 3, 2008

    On another note, if the worksheet is to be checked by a colleague or lecturer, defining a variable several times within a worksheet makes it very difficult to follow and trace your errors.

     

    Mathcad has many ways to define varibles usign a slight variation, which enables users to define varibles as below to show a few.

     

    Clipboard01.jpg

     

    Mike

  • ValeryOchkov Platinum 6,054 posts since
    Sep 26, 2008
    Currently Being Moderated
    Dec 22, 2010 10:14 PM (in response to NeatMachine)
    Re: One green zigzag

    There is very interesting exampte in Rusian Word:

    RusWord.jpg

    Казнить нельзя, помиловать! - Can not be put to death, have mercy! (Word advises me!)

    Казнить, нельзя помиловать! - Executed, can not be pardoned!

    Word is more liberal than...

More Like This

  • Retrieving data ...

Bookmarked By (0)

Legend

  • Correct Answers - 3 points
  • Helpful Answers - 1 points