27 lines
1 KiB
Text
27 lines
1 KiB
Text
use_namespace(rosettacode)_me();
|
|
|
|
// Abstract world collections
|
|
add_var({int},wp1wp2Distance)_value(32); // variable
|
|
add_stack({int},intStack)_values(1,2,3,6,7,9); // stack
|
|
add_queue({double},intStack)_values(0.03,0.04,0.05,0.06,0.07,0.08); // queue
|
|
add_ary({str},citrusFruit)_values(lime,orange,lemon); // array
|
|
add_matrix()_subs(4,4)_identity(); // simple identity matrix
|
|
|
|
// rotation matrix
|
|
add_matrix(wp1Towp2DisplacementRotationMatrix)_row(0.981,-0.155,0.116)_row(0.186,0.924,-0.333)_row(-0.055,0.349,0.936);
|
|
|
|
add_clump()_subs(5,3,2,1); // simple clump (zero'ed)
|
|
|
|
// list (of robots) from abstract robot objects
|
|
add_list({robot},robots)_values([alif],[bah],[tah],[thah],[jim]);
|
|
|
|
// list (of robots) from SQL query
|
|
add_list({robot},robots)_sql(SELECT id, name, type FROM tbl_robot)_as(dba_admin);
|
|
|
|
// dictionary
|
|
add_dict(tanzanianBanknoteWidths)_keys(500,1000,2000,5000,10000)_values(120,125,130,135,140);
|
|
|
|
// hash of two images loaded from URIs
|
|
add_hash()_ary()_values()_img()_load(/img_027454322.jpg)_img()_load(/img_027454323.jpg);
|
|
|
|
reset_ns[];
|