Jump to content



Photo
- - - - -

Undefined Variable !


  • Please log in to reply
2 replies to this topic

#1 masoodkardorost

masoodkardorost

    Newbie

  • Members
  • Pip
  • 21 posts

  • Calculators:
    classpad300+
    casio4800

Posted 09 March 2008 - 01:28 PM

Whenever we address a variable in our program like main\abc() if we don't have that variable in the CP the program shows us "ERROR: Undefined variable"
Is it possible to tell the program that if you couldn't find main\abc show this message like "sorry can't find the number" or?if you couldn't find main\abc do something else.

Thanks

#2 weatherhead

weatherhead

    Newbie

  • Members
  • Pip
  • 17 posts
  • Gender:Male
  • Location:Teesside, UK
  • Interests:music<br />comedy<br />drama<br />physics<br />maths<br />GNU/Linux

  • Calculators:
    casio FX - 85ES
    casio FX 991ES
    Texas TI-83 Plus Silver edition
    casio FX-7400G+
    casio claspad 300+

Posted 09 March 2008 - 08:50 PM

just construct an IF statement at the start of the program to check for the state of the variable and return your message when it is not defined :-)

#3 masoodkardorost

masoodkardorost

    Newbie

  • Members
  • Pip
  • 21 posts

  • Calculators:
    classpad300+
    casio4800

Posted 10 March 2008 - 06:51 PM

did u try?

for example if the program cant find the vriable it shows the error and will not pass that


then how it can show the message?!!!




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users