mirror of
				https://github.com/eledio-devices/thirdparty-tinyexpr.git
				synced 2025-10-31 00:32:38 +01:00 
			
		
		
		
	Changed error handling a bit. te_interp returns NaN for bad expressions.
This commit is contained in:
		| @@ -86,7 +86,7 @@ line. It also does error checking and binds the variables *x* and *y*. | ||||
|             printf("\t%*s^\nError near here", err-1, ""); | ||||
|         } | ||||
|  | ||||
|         /* te_free should always be called after te_compile. */ | ||||
|         /* te_free is safe to call on null. */ | ||||
|         te_free(n); | ||||
|  | ||||
|         return 0; | ||||
| @@ -235,9 +235,6 @@ In addition, the following C math functions are also supported: | ||||
|  | ||||
| - All functions/types start with the letters *te*. | ||||
|  | ||||
| - Remember to always call *te_free* on the result of *te_compile*, even if | ||||
|   there is an error. | ||||
|  | ||||
| - If there is an error, you can usually still evaluate the first part of the | ||||
|   expression.  This may or may not be useful to you. | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user