Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

Math eval - where it is ?
Started by teterinis Jun 18 2019 02:54 AM

4 replies to this topic
[TOPIC CONTROLS]
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

teterinis

[GLOBAL: userInfoPane.html]
teterinis
  • Observer

  • 6 posts
  • Corona SDK

I tried use loadstring, then load, then https://github.com/jbp4444/EvalExpression evalmath

 

Nothing work

 

Please tell me , what solution is for eval math ?

 

print('1+2') --3 ))



[TOPIC: post.html]
#2

nick_sherman

[GLOBAL: userInfoPane.html]
nick_sherman
  • Corona Geek

  • 1,803 posts
  • Corona SDK

Why didn't the GitHub library work? Looks pretty straight-forward to me:

 

Put EvalExpression.lua file in your project directory then:

 

 
require( "EvalExpression" )
 
print (evalString("1+2",nil))
 


  • teterinis likes this

[TOPIC: post.html]
#3

teterinis

[GLOBAL: userInfoPane.html]
teterinis
  • Observer

  • 6 posts
  • Corona SDK

 ab94934c1bc2434704cd48e9f39a776f.png

 

something wrong in EvalEcpression )))

i have latest Corona and latest EvalExpression..

 



[TOPIC: post.html]
#4

nick_sherman

[GLOBAL: userInfoPane.html]
nick_sherman
  • Corona Geek

  • 1,803 posts
  • Corona SDK

Looks like the guy has a debugging library he hasn't included. Just add this line after the require:

 

dprint = function() end
 

  • teterinis likes this

[TOPIC: post.html]
#5

teterinis

[GLOBAL: userInfoPane.html]
teterinis
  • Observer

  • 6 posts
  • Corona SDK

Wow.. 8(__)

Yes.. it work )))

 

Thanks you


  • nick_sherman likes this


[topic_controls]
[/topic_controls]