| Line 1: |
Line 1: |
| − | Here are test cases to try out on ZCubes Code Cubes. Please note that all of the below follow the Z3 Language (Enhanced from Javascript), and hence apart from being simple, it gives you full programming capability.
| + | Following are test cases to try out in ZCubes. Please note that the examples follow z^3 Language. Apart from being simple, z^3 language also give you full programming capability of Javascript and more, as the language enhances and converts to Javascript internally. z^3 runs within browsers, desktops, servers, web-servers, etc., and provides a full scale experience to the users, in all modes, operating systems and platforms of computing. |
| | | | |
| | | | |
| Line 80: |
Line 80: |
| | | | |
| | *[[ Z%5E3_Language_Documentation | See Also - Z3 Language Documentation ]] | | *[[ Z%5E3_Language_Documentation | See Also - Z3 Language Documentation ]] |
| | + | |
| | + | =Regular Expressions= |
| | + | |
| | + | a=["cat","dog","rat"]; |
| | + | |
| | + | a.filter( |
| | + | |
| | + | x=>x.match(/(o|t)/) |
| | + | |
| | + | ) |
| | + | |
| | + | Output: cat dog rat |
| | + | |
| | + | |
| | + | |
| | + | a=["cat","dog","rat","rat1"]; |
| | + | |
| | + | a.map( |
| | + | |
| | + | x=>x.match(/[0-9]/) |
| | + | |
| | + | ) |
| | + | |
| | + | Output: null null null 1 |
| | + | |
| | + | |
| | + | |
| | + | a=["cat","dog","r2iat","rat1"]; |
| | + | |
| | + | a.filter( |
| | + | |
| | + | x=>x.match(/[hc]?at/) |
| | + | |
| | + | ) |
| | + | |
| | + | Output: cat r2iat rat1 |
| | + | |
| | + | |
| | + | |
| | + | a=13; |
| | + | |
| | + | b=34; |
| | + | |
| | + | a..b |
| | + | |
| | + | Output: 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
| | + | |
| | + | |
| | + | |
| | + | 5√(1..34) |
| | + | |
| | + | |
| | + | (2..5)√(10..34) |
| | + | |
| | + | |
| | + | |
| | + | a=45m; |
| | + | |
| | + | c=56cm; |
| | + | |
| | + | a<+>c |
| | + | |
| | + | Output: 4556cm |
| | + | |
| | | | |
| | =Combinatorial Arguments and Implicit Looping= | | =Combinatorial Arguments and Implicit Looping= |
| Line 645: |
Line 709: |
| | | | |
| | | | |
| − | SET(#TABLE1!B2:D5,1100); | + | SETVALUE(#TABLE1!B2:D5,1100); |
| | | | |
| − | // sets into calci such values | + | // sets into calci such values. TABLE1 needs to be opened through 'New-->Calci' |
| | | | |
| − | SET(#TABLE1!B2:D5,1..100); | + | SETVALUE(#TABLE1!B2:D5,1..100); |
| | | | |
| | | | |
| Line 656: |
Line 720: |
| | 1..1100.chunks(3) did not parse. | | 1..1100.chunks(3) did not parse. |
| | | | |
| − | SET(#TABLE1!B2:D5,54..100.chunks(2)); | + | SETVALUE(#TABLE1!B2:D5,54..100.chunks(2)); |
| | | | |
| − | SET(#TABLE1!B2:D5,54..100.chunks(2)~); | + | SETVALUE(#TABLE1!B2:D5,54..100.chunks(2)~); |
| | | | |
| | | | |
| Line 880: |
Line 944: |
| | function x1(x){return(x+34)};x1(304) | | function x1(x){return(x+34)};x1(304) |
| | | | |
| − | | + | |
| | | | |
| | | | |
| Line 902: |
Line 966: |
| | | | |
| | | | |
| − | *[[ Z_API_Functions| See Also - Z3 API Functions List ]] | + | *[[ Z_API_Functions| See also - Z3 API Functions List ]] |
| | *[[ Z3 | << Z3 Home ]] | | *[[ Z3 | << Z3 Home ]] |