From 42ec7286b2d36a9ba22925f816a17cb1cc2aa5ce Mon Sep 17 00:00:00 2001 From: chai Date: Sat, 30 Oct 2021 11:32:16 +0800 Subject: + Penlight --- .../docs/examples/testinputfields.lua.html | 140 +++++++++++++++++++++ 1 file changed, 140 insertions(+) create mode 100644 Data/Libraries/Penlight/docs/examples/testinputfields.lua.html (limited to 'Data/Libraries/Penlight/docs/examples/testinputfields.lua.html') diff --git a/Data/Libraries/Penlight/docs/examples/testinputfields.lua.html b/Data/Libraries/Penlight/docs/examples/testinputfields.lua.html new file mode 100644 index 0000000..0fa63e4 --- /dev/null +++ b/Data/Libraries/Penlight/docs/examples/testinputfields.lua.html @@ -0,0 +1,140 @@ + + + + + Penlight Documentation + + + + +
+ +
+ +
+
+
+ + +
+ + + + + + +
+ +

testinputfields.lua

+
+local input = require 'pl.input'
+local sum = 0.0
+local count = 0
+local text = [[
+    981124001	2.0	18988.4	10047.1	4149.7
+    981125001	0.8	19104.0	9970.4	5088.7
+    981127003	0.5	19012.5	9946.9	3831.2
+]]
+for id,magn,x in input.fields(3,' ',text) do
+  sum = sum + x
+  count = count + 1
+end
+print('average x coord is ',sum/count)
+ + +
+
+
+generated by LDoc 1.4.6 +
+
+ + -- cgit v1.1-26-g67d0