Jump to content



Photo

Variables


  • Please log in to reply
1 reply to this topic

#1 Colombia

Colombia

    Casio Addict

  • Members
  • PipPipPip
  • 94 posts
  • Gender:Male
  • Location:Venezuela

  • Calculators:
    algebra FX 2.0 plus
    Classpad 300

Posted 10 November 2007 - 02:05 AM

Can I call variables from any folder on CPLUA? And can I stored on CPLUA any variable to any folder to then use it on the main?

#2 Colombia

Colombia

    Casio Addict

  • Members
  • PipPipPip
  • 94 posts
  • Gender:Male
  • Location:Venezuela

  • Calculators:
    algebra FX 2.0 plus
    Classpad 300

Posted 16 February 2008 - 04:48 PM

I already know how to store and use variables than we created on the main on CPLua.

Stored any variable on the main in any folder
Example:
Current folder (Temp)
56=>var

Now open CPLua then write this:

cas.setfolder("Temp")
print(cas("var"))

This code can help you to see your desirable variable.

If you have a CPLua code and you need to save it on any folder to later use on the main, write this

cas("56=>var")

the only problem with this is: The variables are stored as userdata.

I don`t know how to change type. Example userdata To table, or userdata To string
The only things that I know is how to change userdata to number

Example (userdataTonumber):

x=cas(input("x: "))
--The variable x is stored as userdata
print(type(x))
m=x(0)
--We change x to m and then change also the type. Userdata to number
print(type(m))


2 user(s) are reading this topic

0 members, 2 guests, 0 anonymous users