8000 Merge pull request #468 from vocaviking/patch-1 · ChaiScript/ChaiScript@b0c1483 · GitHub
[go: up one dir, main page]

Skip to content

Commit b0c1483

Browse files
authored
Merge pull request #468 from vocaviking/patch-1
Updated cheatsheet.md
2 parents 8c7ea9b + c0f217a commit b0c1483

File tree

1 file changed

+4
-20
lines changed

1 file changed

+4
-20
lines changed

cheatsheet.md

Lines changed: 4 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,11 @@ ChaiScript tries to follow the [Semantic Versioning](http://semver.org/) scheme.
1111
# Initializing ChaiScript
1212

1313
```
14-
chaiscript::ChaiScript chai; // loads stdlib from loadable module on file system
15-
chaiscript::ChaiScript chai(chaiscript::Std_Lib::library()); // compiles in stdlib
14+
chaiscript::ChaiScript chai; // initializes ChaiScript, adding the standard ChaiScript types (map, string, ...)
1615
```
1716

1817
Note that ChaiScript cannot be used as a global / static object unless it is being compiled with `CHAISCRIPT_NO_THREADS`.
1918

20-
2119
# Adding Things To The Engine
2220

2321
## Adding a Function / Method / Member
@@ -571,23 +569,6 @@ If both a 2 parameter and a 3 parameter signature match, the 3 parameter functio
571569

572570
# Built In Functions
573571

8000
574-
## Disabling Built-Ins
575-
576-
When constructing a ChaiScript object, a vector of parameters can be passed in to disable or enable various built-in methods.
577-
578-
Current options:
579-
580-
```
581-
enum class Options
582-
{
583-
Load_Modules,
584-
No_Load_Modules,
585-
External_Scripts,
586-
No_External_Scripts
587-
};
588-
```
589-
590-
591572
## Evaluation
592573

593574
```
@@ -603,3 +584,6 @@ Both `use` and `eval_file` search the 'usepaths' passed to the ChaiScript constr
603584

604585
* `from_json` converts a JSON string into its strongly typed (map, vector, int, double, string) representations
605586
* `to_json` converts a ChaiScript object (either a `Object` or one of map, vector, int, double, string) tree into its JSON string representation
587+
588+
## Extras
589+
ChaiScript itself does not provide a link to the math functions defined in `<cmath>`. You can either add them yourself, or use the [https://github.com/ChaiScript/ChaiScript_Extras](ChaiScript_Extras) helper library. (Which also provides some additional string functions.)

0 commit comments

Comments
 (0)
0