1 The `warn()` function outputs the given values to stderr. 2 3 Returns the amount of bytes written. 4 5 -- Testcase -- 6 {% 7 let n = 0; 8 9 n += warn(null, "\n"); 10 n += warn(true, "\n"); 11 n += warn(false, "\n"); 12 n += warn(123, "\n"); 13 n += warn(456.789, "\n"); 14 n += warn(NaN, "\n"); 15 n += warn(Infinity, "\n"); 16 n += warn("Hello world", "\n"); 17 n += warn([ 1, 2, 3 ], "\n"); 18 n += warn({ some: "dict" }, "\n"); 19 n += warn(warn, "\n"); 20 21 warn(n, " bytes written\n"); 22 %} 23 -- End -- 24 25 -- Expect stderr -- 26 27 true 28 false 29 123 30 456.789 31 NaN 32 Infinity 33 Hello world 34 [ 1, 2, 3 ] 35 { "some": "dict" } 36 function warn(...) { [native code] } 37 117 bytes written 38 -- End -- 39 40
This page was automatically generated by LXR 0.3.1. • OpenWrt