Difference between revisions of "ZCubes/Unit Conversions in ZCubes"
(→Code) |
(→Code) |
||
(One intermediate revision by one other user not shown) | |||
Line 9: | Line 9: | ||
==Code== | ==Code== | ||
− | + | <br/>1mi | |
− | + | <br/>--> displays 1 mi as output | |
− | + | <br/>1km | |
− | + | <br/>--> displays 1 km as output | |
− | + | <br/>a=2km | |
− | + | <br/>a<>mi | |
− | + | <br/>-->displays 1.2427423844746681mi as output | |
− | |||
− | |||
− | |||
− | + | Unit conversions on array of numbers : | |
− | + | <br/>a=1..10; | |
+ | <br/>b=a<>mi | ||
+ | <br/>b<>km | ||
+ | <br/>--> displays the converted items of 1mi,2mi,......10mi into km | ||
+ | <br/>a=1..10; | ||
+ | <br/>b=a<>degC (type degC and 'Shift+Space' to get symbol) | ||
+ | <br/>b<>degF | ||
+ | <br/>--> displays the converted items of 1degC,2degC,......10degC into degF | ||
− | <<[[ | + | <br/>a=90deg; |
+ | <br/>SIN(a) | ||
+ | <br/>-->First, degrees is converted to rad and then SIN(a) is performed to get an output '1'. | ||
+ | |||
+ | |||
+ | |||
+ | <br/> | ||
+ | *[[Z3 | Z3 home]] | ||
+ | *[[Z^3 Language Documentation]] | ||
+ | *[[ZCubes_Videos | ZCubes Videos and Tutorials]] | ||
+ | *[[Main_Page | About ZCubes ]] | ||
+ | <br/> | ||
<br/> | <br/> | ||
− | © Copyright 1996- | + | © Copyright 1996-2021, ZCubes, Inc. |
Latest revision as of 00:26, 11 March 2021
Unit Conversions in ZCubes
ZCubes is a platform that is 'Units Aware'. You can provide the units for specific values, and ZCubes will compute and produce the result, based on the resultant units. This is a powerful feature for the user to save time and effort by not having to write the unit conversion algorithms. ZCubes takes care of this in the computation.
Video
Code
1mi
--> displays 1 mi as output
1km
--> displays 1 km as output
a=2km
a<>mi
-->displays 1.2427423844746681mi as output
Unit conversions on array of numbers :
a=1..10;
b=a<>mi
b<>km
--> displays the converted items of 1mi,2mi,......10mi into km
a=1..10;
b=a<>degC (type degC and 'Shift+Space' to get symbol)
b<>degF
--> displays the converted items of 1degC,2degC,......10degC into degF
a=90deg;
SIN(a)
-->First, degrees is converted to rad and then SIN(a) is performed to get an output '1'.
© Copyright 1996-2021, ZCubes, Inc.