Skip to content

Commit 65fa4fe

Browse files
committed
Documentation updates
1 parent 5dc1117 commit 65fa4fe

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

src/main/java/com/laytonsmith/core/functions/ArrayHandling.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3007,7 +3007,13 @@ public ExampleScript[] examples() throws ConfigCompileException {
30073007
+ "// A collection of square sides\n"
30083008
+ "@squares = array(1, 4, 8);\n"
30093009
+ "@areas = array_map(@squares, @areaOfSquare);\n"
3010-
+ "msg(@areas);")
3010+
+ "msg(@areas);"),
3011+
new ExampleScript("Parsing a csv file with minimal code",
3012+
"string @file = 'a, b, c\\nz, y, x\\n1, 2, 3\\n99, 98, 97'; // Could be a read()\n"
3013+
+ "array @list = array_map(split('\\n', @file), closure(@line) {\n"
3014+
+ " return(split(',', @line));\n"
3015+
+ "});\n"
3016+
+ "msg(@list);")
30113017
};
30123018
}
30133019

src/main/resources/siteDeploy/VersionFrontPage

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,14 @@
88
* Write your own /tp, /time, or /warp
99
* Do much more, from the simple to the complex, with zero Java code.
1010

11+
'''MethodScript''' is the name of the programming language that CommandHelper uses, and there is a commandline version
12+
of MethodScript as well, that you can use outside of Minecraft. MethodScript is an imperative, dynamic, event driven,
13+
value-level, metaprogramming (reflective), structured (block-structured, semi-object-oriented, semi-class-based,
14+
recursive), parallel, partially strongly typed language, and is an active work in progress.
15+
16+
The developers of MethodScript do not recommend it (yet) for production or otherwise critical code, however,
17+
as a quick scripting language, or for use in Minecraft, it is highly recommended.
18+
1119
Remember that [https://github.com/EngineHub/commandhelper CommandHelper is open source].
1220

1321
== Installation ==

0 commit comments

Comments
 (0)