Nim/examples/cross_calculator
2017-11-15 21:58:11 +01:00
..
android Removes dead references. 2015-08-17 23:30:36 +02:00
ios Change expr/stmt in examples to untyped (#6734) 2017-11-15 21:58:11 +01:00
lazarus Change expr/stmt in examples to untyped (#6734) 2017-11-15 21:58:11 +01:00
nim_backend examples: Trim .nim files trailing whitespace 2015-09-04 23:05:22 +02:00
nim_commandline Change expr/stmt in examples to untyped (#6734) 2017-11-15 21:58:11 +01:00
.gitignore Clean up gitignore, the current ignore is equvilent to the previous 2014-04-23 21:57:01 -04:00
readme.txt Change expr/stmt in examples to untyped (#6734) 2017-11-15 21:58:11 +01:00

The cross platform calculator illustrates how to use Nim to create a backend
called by different native user interfaces.

Since the purpose of the example is to show how the cross platform code
interacts with Nim the actual backend code is just a simple addition proc.
By keeping your program logic in Nim you can easily reuse it in different
platforms.

To avoid duplication of code, the backend code lies in a separate directory and
each platform compiles it with a different custom build process, usually
generating C code in a temporary build directory.

For a more elaborate and useful example see the cross_todo example.