From 534897d8358bd61be8452852a04b00919a77310d Mon Sep 17 00:00:00 2001 From: Ionoclast Laboratories Date: Thu, 2 Mar 2017 11:27:10 -0800 Subject: [PATCH] Fixes path reference and code formatting in readme. Changes Example.cpp's directory "src" => "samples" to match repo. Change code example from indented quote to highlighted code block. --- readme.md | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/readme.md b/readme.md index 58cd1bd..8bf4dee 100644 --- a/readme.md +++ b/readme.md @@ -79,7 +79,7 @@ directory, and for more in-depth look at the language, the unit tests in the "unittests" directory cover the most ground. For examples of how to register parts of your C++ application, see -"example.cpp" in the "src" directory. Example.cpp is verbose and shows every +"example.cpp" in the "samples" directory. Example.cpp is verbose and shows every possible way of working with the library. For further documentation generate the doxygen documentation in the build folder or see the website http://www.chaiscript.com. @@ -87,21 +87,21 @@ http://www.chaiscript.com. The shortest complete example possible follows: - /// main.cpp +```C++ +/// main.cpp - #include +#include - double function(int i, double j) - { - return i * j; - } - - int main() - { - chaiscript::ChaiScript chai; - chai.add(chaiscript::fun(&function), "function"); - - double d = chai.eval("function(3, 4.75);"); - } +double function(int i, double j) +{ + return i * j; +} +int main() +{ + chaiscript::ChaiScript chai; + chai.add(chaiscript::fun(&function), "function"); + double d = chai.eval("function(3, 4.75);"); +} +```