<class doc
on =req
summary =opt=string
label =opt=string
author =opt
title =opt
status ="released"=<type.one_of "alpha" "beta" string/>
see_also =opt
doc_folder =false=<type.one_of false resource.filesystem.folder/>
show_browser_window=false
fields =opt
precondition =opt=<type.one_of string hypertext _name="static_content"/>
postcondition =opt=<type.one_of string hypertext _name="static_content"/>
tests =opt=<type.vector_of test/>
base_href =false
footer =opt
content_vector=opt
typical_values=opt
run_tests =false
write_file =false
cache_every_instance=true
of =<thing <do bk.chapter_group.of.system_interfaces/>=<doc on=bk.chapter_group.of.system_interfaces on_path="bk.chapter_group.of.system_interfaces"/> <do bk.chapter.of.rich_ui_input/>=<doc on=bk.chapter.of.rich_ui_input on_path="bk.chapter.of.rich_ui_input"/> <do bk.topic.of.deploy_thin/>=<doc on=bk.topic.of.deploy_thin on_path="bk.topic.of.deploy_thin"/> <do bk.chapter.of.format_xmls/>=<doc on=bk.chapter.of.format_xmls on_path="bk.chapter.of.format_xmls"/> <do bk.chapter_group.of.string_to_object/>=<doc on=bk.chapter_group.of.string_to_object on_path="bk.chapter_group.of.string_to_object"/> <do bk.chapter_group.of.type_and_object_system/>=<doc on=bk.chapter_group.of.type_and_object_system on_path="bk.chapter_group.of.type_and_object_system"/> <do bk.chapter.of.if/>=<doc on=bk.chapter.of.if on_path="bk.chapter.of.if"/> <do bk.chapter_group.of.data_types/>=<doc on=bk.chapter_group.of.data_types on_path="bk.chapter_group.of.data_types"/> <do bk.chapter.of.getting_started/>=<doc on=bk.chapter.of.getting_started on_path="bk.chapter.of.getting_started"/> <do bk.chapter_group.of.life_cycle/>=<doc on=bk.chapter_group.of.life_cycle on_path="bk.chapter_group.of.life_cycle"/> <do bk.chapter_group.of.meta_programming/>=<doc on=bk.chapter_group.of.meta_programming on_path="bk.chapter_group.of.meta_programming"/> <do biz.places/>=<doc on=biz.places on_path="biz.places"/> <do bk.chapter.of.doc/>=<doc on=bk.chapter.of.doc on_path="bk.chapter.of.doc"/> <do bk.chapter_group.of.intro/>=<doc on=bk.chapter_group.of.intro on_path="bk.chapter_group.of.intro"/> <do bk.topic.of.quick_reference/>=<doc on=bk.topic.of.quick_reference content_vector=<vector <h3 "Concise XML Syntax &nbsp; &nbsp; &nbsp; " <i "source &nbsp; =&gt; &nbsp; result"/>/> <test result="ignore" on=tests.other_f_test name="Full closing tag" source="<body> the content </body>" containing_file="file:///Users/mseelig/Documents/workspace/steam_working/doc/bk.topic.of.quick_reference_f_doc.h2o"/> <test result="ignore" on=tests.other_f_test name="Short closing tag" source="<body> the content </>" containing_file="file:///Users/mseelig/Documents/workspace/steam_working/doc/bk.topic.of.quick_reference_f_doc.h2o"/> <test result="ignore" on=tests.other_f_test name="No content" source="<body/>" containing_file="file:///Users/mseelig/Documents/workspace/steam_working/doc/bk.topic.of.quick_reference_f_doc.h2o"/> <test result="4" on=tests.other_f_test name="Attributes hold any object or expression" source="<thing age=<plus 2 2/> male=true/>.age" containing_file="file:///Users/mseelig/Documents/workspace/steam_working/doc/bk.topic.of.quick_reference_f_doc.h2o"/> <test result="123" on=tests.other_f_test name="Pass arg via keyword" source="<class boat weight=req/> &#13;
<boat weight=123/>.weight" containing_file="file:///Users/mseelig/Documents/workspace/steam_working/doc/bk.topic.of.quick_reference_f_doc.h2o"/> <test result="123" on=tests.other_f_test name="Pass arg via position" source="<class boat weight=req/> <boat 123/>.weight" containing_file="file:///Users/mseelig/Documents/workspace/steam_working/doc/bk.topic.of.quick_reference_f_doc.h2o"/> <test result="ignore" on=tests.other_f_test name="Comment" source="<!-- code in here is ignored. -->" containing_file="file:///Users/mseelig/Documents/workspace/steam_working/doc/bk.topic.of.quick_reference_f_doc.h2o"/> <test result="5" on=tests.other_f_test name="Subject of call" source="2.<plus 3/> <!-- 2 is the _subject of the call to plus -->" containing_file="file:///Users/mseelig/Documents/workspace/steam_working/doc/bk.topic.of.quick_reference_f_doc.h2o"/> <h3 "Object System: everything is an object"/> <test result="ignore" on=tests.other_f_test name="Objects" do_not_run=true source="Objects have fields, each of which has a key and a value.&#13;
Values can be any type of object. So can keys." containing_file="file:///Users/mseelig/Documents/workspace/steam_working/doc/bk.topic.of.quick_reference_f_doc.h2o"/> <test result="wob" on=tests.other_f_test name="Root: Water Object" source="<!-- all objects have both a _parent field and &#13;
wob as an ancestor, except wob itself --> wob" containing_file="file:///Users/mseelig/Documents/workspace/steam_working/doc/bk.topic.of.quick_reference_f_doc.h2o"/> <test result="thing" on=tests.other_f_test name="Generic object" source="thing <!-- a thing can have any fields -->" containing_file="file:///Users/mseelig/Documents/workspace/steam_working/doc/bk.topic.of.quick_reference_f_doc.h2o"/> <test result="ignore" on=tests.other_f_test name="Named &amp; vector fields" source="wob.<set foo=<thing x=100 y=555 20 30 40/> />" containing_file="file:///Users/mseelig/Documents/workspace/steam_working/doc/bk.topic.of.quick_reference_f_doc.h2o"/> <test result="100" on=tests.other_f_test name="value of field 'x'" source="wob.foo.x" containing_file="file:///Users/mseelig/Documents/workspace/steam_working/doc/bk.topic.of.quick_reference_f_doc.h2o"/> <test result="40" on=tests.other_f_test name="value of field 2" source="wob.foo.2" containing_file="file:///Users/mseelig/Documents/workspace/steam_working/doc/bk.topic.of.quick_reference_f_doc.h2o"/> <test result="true" on=tests.other_f_test name="Instance of class?" source="10.<is_a number/>" containing_file="file:///Users/mseelig/Documents/workspace/steam_working/doc/bk.topic.of.quick_reference_f_doc.h2o"/> <h3 "Basic Operations: get, set, remove"/> <test result="5" on=tests.other_f_test name="Dot notation" source="<thing bar=5/>.bar" containing_file="file:///Users/mseelig/Documents/workspace/steam_working/doc/bk.topic.of.quick_reference_f_doc.h2o"/> <test result='"hi"' on=tests.other_f_test name="Get value" source='<thing 6="hi"/>.<get 2.<times 3/>/>' containing_file="file:///Users/mseelig/Documents/workspace/steam_working/doc/bk.topic.of.quick_reference_f_doc.h2o"/> <test result="0" on=tests.other_f_test source='<thing 6="hi"/>.<get 5 lookup=false &#13;
if_missing=0/>' containing_file="file:///Users/mseelig/Documents/workspace/steam_working/doc/bk.topic.of.quick_reference_f_doc.h2o"/> <test result='"value1"' on=tests.other_f_test name="Assign variable(s)" source='<set key1="value1" key2="value2"/> key1' containing_file="file:///Users/mseelig/Documents/workspace/steam_working/doc/bk.topic.of.quick_reference_f_doc.h2o"/> <test result='"wood"' on=tests.other_f_test name="Assign field" source='thing.<set material="wood"/> thing.material' containing_file="file:///Users/mseelig/Documents/workspace/steam_working/doc/bk.topic.of.quick_reference_f_doc.h2o"/> <test result="true" on=tests.other_f_test name="Field exists?" source='thing.<has "material"/>' containing_file="file:///Users/mseelig/Documents/workspace/steam_working/doc/bk.topic.of.quick_reference_f_doc.h2o"/> <test result="false" on=tests.other_f_test source='thing.<has "junk"/>' containing_file="file:///Users/mseelig/Documents/workspace/steam_working/doc/bk.topic.of.quick_reference_f_doc.h2o"/> <test result='"wood"' on=tests.other_f_test name="Remove field" source='thing.<remove "material"/>' containing_file="file:///Users/mseelig/Documents/workspace/steam_working/doc/bk.topic.of.quick_reference_f_doc.h2o"/> <test result="false" on=tests.other_f_test source='thing.<has "material"/>' containing_file="file:///Users/mseelig/Documents/workspace/steam_working/doc/bk.topic.of.quick_reference_f_doc.h2o"/> <h3 "boolean: true and false"/> <test result="false" on=tests.other_f_test name="and" source="true.<and false/>" containing_file="file:///Users/mseelig/Documents/workspace/steam_working/doc/bk.topic.of.quick_reference_f_doc.h2o"/> <test result="true" on=tests.other_f_test name="or" source="true.<or false true/>" containing_file="file:///Users/mseelig/Documents/workspace/steam_working/doc/bk.topic.of.quick_reference_f_doc.h2o"/> <test result="false" on=tests.other_f_test name="not" source="true.<not/> <not true/> 123.<not/> <!--any arg but false returns false-->" containing_file="file:///Users/mseelig/Documents/workspace/steam_working/doc/bk.topic.of.quick_reference_f_doc.h2o"/> <test result="true" on=tests.other_f_test name="Same object?" source="5.<is 5/>" containing_file="file:///Users/mseelig/Documents/workspace/steam_working/doc/bk.topic.of.quick_reference_f_doc.h2o"/> <test result="false" on=tests.other_f_test source="<thing/>.<is <thing/>/>" containing_file="file:///Users/mseelig/Documents/workspace/steam_working/doc/bk.topic.of.quick_reference_f_doc.h2o"/> <test result="true" on=tests.other_f_test name="Same valued fields" source="<thing foo=5/>.<equal <thing foo=5/> />" containing_file="file:///Users/mseelig/Documents/workspace/steam_working/doc/bk.topic.of.quick_reference_f_doc.h2o"/> <test result="false" on=tests.other_f_test name="false values using boolean.from. Other args result in true." source='boolean.<from "false"/> boolean.<from "no"/> &#13;
boolean.<from "null"/> boolean.<from null/> &#13;
boolean.<from 0/> boolean.<from -1/>&#13;
<!-- all return false -->' containing_file="file:///Users/mseelig/Documents/workspace/steam_working/doc/bk.topic.of.quick_reference_f_doc.h2o"/> <h3 "number"/> <test result="true" on=tests.other_f_test name="integer" source="42.<is_a integer/>" containing_file="file:///Users/mseelig/Documents/workspace/steam_working/doc/bk.topic.of.quick_reference_f_doc.h2o"/> <test result="true" on=tests.other_f_test source="-1.<is_a integer/>" containing_file="file:///Users/mseelig/Documents/workspace/steam_working/doc/bk.topic.of.quick_reference_f_doc.h2o"/> <test result="true" on=tests.other_f_test name="double: floating point" source="4.53.<is_a number.double/>" containing_file="file:///Users/mseelig/Documents/workspace/steam_working/doc/bk.topic.of.quick_reference_f_doc.h2o"/> <test result="true" on=tests.other_f_test source="-0.11.<is_a number.double/>" containing_file="file:///Users/mseelig/Documents/workspace/steam_working/doc/bk.topic.of.quick_reference_f_doc.h2o"/> <test result="ignore" on=tests.other_f_test name="Arithmetic" do_not_run=true source="plus minus times divide remainder" containing_file="file:///Users/mseelig/Documents/workspace/steam_working/doc/bk.topic.of.quick_reference_f_doc.h2o"/> <test result="5.3" on=tests.other_f_test name="plus" source="2.<plus 3.3/>" containing_file="file:///Users/mseelig/Documents/workspace/steam_working/doc/bk.topic.of.quick_reference_f_doc.h2o"/> <test result="9" on=tests.other_f_test name="_subject defaults to 0" source="<plus 2 3 4/> <!--plus and times take any number of args-->" containing_file="file:///Users/mseelig/Documents/workspace/steam_working/doc/bk.topic.of.quick_reference_f_doc.h2o"/> <test result="9.0" on=tests.other_f_test name="( 5 * 6 ) / 3 - 1" source="5.<times 6/>.<divide 3/>.<minus 1/>" containing_file="file:///Users/mseelig/Documents/workspace/steam_working/doc/bk.topic.of.quick_reference_f_doc.h2o"/> <test result="5" on=tests.other_f_test name="Rounding" source="integer.<from 5.3 direction='down'/>" containing_file="file:///Users/mseelig/Documents/workspace/steam_working/doc/bk.topic.of.quick_reference_f_doc.h2o"/> <test result="1" on=tests.other_f_test name="Modulus" source="10.<remainder 3/>" containing_file="file:///Users/mseelig/Documents/workspace/steam_working/doc/bk.topic.of.quick_reference_f_doc.h2o"/> <test result="true" on=tests.other_f_test name="Comparators" source="7.<more 5/> 5.<less 7/> 5.<more_or_equal 5/> 5.<less_or_equal 5/> &#13;
<!-- all return true -->" containing_file="file:///Users/mseelig/Documents/workspace/steam_working/doc/bk.topic.of.quick_reference_f_doc.h2o"/> <h3 "string"/> <test result='"a_string"' on=tests.other_f_test name="Create string" source="&quot;a_string&quot; 'a_string' <string>a_string</string> <![CDATA[a_string]]>" containing_file="file:///Users/mseelig/Documents/workspace/steam_working/doc/bk.topic.of.quick_reference_f_doc.h2o"/> <test result='"you2me"' on=tests.other_f_test name="Concatenate" source='"you".<join 2 "me"/>' containing_file="file:///Users/mseelig/Documents/workspace/steam_working/doc/bk.topic.of.quick_reference_f_doc.h2o"/> <test result="5" on=tests.other_f_test name="Length" source='"Water".<length/>' containing_file="file:///Users/mseelig/Documents/workspace/steam_working/doc/bk.topic.of.quick_reference_f_doc.h2o"/> <test result='<char "W"/>
' on=tests.other_f_test name="Get a character" source='"Water".0' containing_file="file:///Users/mseelig/Documents/workspace/steam_working/doc/bk.topic.of.quick_reference_f_doc.h2o"/> <test result='"Wat"' on=tests.other_f_test name="Substring" source='"Water".<subvector start=0 end=3/>' containing_file="file:///Users/mseelig/Documents/workspace/steam_working/doc/bk.topic.of.quick_reference_f_doc.h2o"/> <test result="2" on=tests.other_f_test name="Index of value" source='"Water".<key_of <char "t"/> />' containing_file="file:///Users/mseelig/Documents/workspace/steam_working/doc/bk.topic.of.quick_reference_f_doc.h2o"/> <test result='"better"' on=tests.other_f_test name="Replace string" source='"Water".<replace "Wa" "bet"/>' containing_file="file:///Users/mseelig/Documents/workspace/steam_working/doc/bk.topic.of.quick_reference_f_doc.h2o"/> <test result="true" on=tests.other_f_test name="Strings are interned" source='"a".<is "a"/>' containing_file="file:///Users/mseelig/Documents/workspace/steam_working/doc/bk.topic.of.quick_reference_f_doc.h2o"/> <test result="true" on=tests.other_f_test name="Loose equality" source='" CM".<equal "cm" same_case=false same_whitespace=false/>' containing_file="file:///Users/mseelig/Documents/workspace/steam_working/doc/bk.topic.of.quick_reference_f_doc.h2o"/> <h3 "Data collection or array: vector"/> <test result="ignore" on=tests.other_f_test name="Create vectors" source='<vector 5 "a" "bcd"/> <vector> 5 "a" "bcd" </vector>' containing_file="file:///Users/mseelig/Documents/workspace/steam_working/doc/bk.topic.of.quick_reference_f_doc.h2o"/> <test result="ignore" on=tests.other_f_test name="synonym for vector" source='<v 5 "a" "bcd"/>' containing_file="file:///Users/mseelig/Documents/workspace/steam_working/doc/bk.topic.of.quick_reference_f_doc.h2o"/> <test result='"a"' on=tests.other_f_test name="Get field value" source='<vector 5 "a"/>.1' containing_file="file:///Users/mseelig/Documents/workspace/steam_working/doc/bk.topic.of.quick_reference_f_doc.h2o"/> <test result='"a"' on=tests.other_f_test name="Indirect" source='<set x=1/> <vector 5 "a"/>.<get x/>' containing_file="file:///Users/mseelig/Documents/workspace/steam_working/doc/bk.topic.of.quick_reference_f_doc.h2o"/> <test result="2" on=tests.other_f_test name="Vector length" source='<vector 5 "a"/>.<length/>' containing_file="file:///Users/mseelig/Documents/workspace/steam_working/doc/bk.topic.of.quick_reference_f_doc.h2o"/> <test result='<vector "a" "m" "x"/>
' on=tests.other_f_test name="Sorting" source='<vector "m" "a" "x" />.<sort/>' containing_file="file:///Users/mseelig/Documents/workspace/steam_working/doc/bk.topic.of.quick_reference_f_doc.h2o"/> <test result='<vector "z" "y" "x"/>
' on=tests.other_f_test name="Reverse" source='<vector "x" "y" "z" />.<reverse/>' containing_file="file:///Users/mseelig/Documents/workspace/steam_working/doc/bk.topic.of.quick_reference_f_doc.h2o"/> <test result="6" on=tests.other_f_test name="2D vector" source="<set Q=<vector 4 5 <vector 6 7 8/> /> /> Q.2.0" containing_file="file:///Users/mseelig/Documents/workspace/steam_working/doc/bk.topic.of.quick_reference_f_doc.h2o"/> <test result="25" on=tests.other_f_test name="Get from end" source="<vector 5 10 15 20 25 30/>.<last 1/>" containing_file="file:///Users/mseelig/Documents/workspace/steam_working/doc/bk.topic.of.quick_reference_f_doc.h2o"/> <test result='<vector "a" "z"/>
' on=tests.other_f_test name="Push value on end" source='<vector "a"/>.<insert "z"/>' containing_file="file:///Users/mseelig/Documents/workspace/steam_working/doc/bk.topic.of.quick_reference_f_doc.h2o"/> <test result='<vector "z" "a"/>
' on=tests.other_f_test name="Insert at index" source='<vector "a"/>.<insert "z" at_key=0/>' containing_file="file:///Users/mseelig/Documents/workspace/steam_working/doc/bk.topic.of.quick_reference_f_doc.h2o"/> <test result="<vector 6 7 8 9/>
" on=tests.other_f_test name="Append vector values" source="<v 6 7/>.<insert _other_unkeyed=<v 8 9/> />" containing_file="file:///Users/mseelig/Documents/workspace/steam_working/doc/bk.topic.of.quick_reference_f_doc.h2o"/> <test result='"b"' on=tests.other_f_test name="Remove" source='<vector "a" "b" "c"/>.<remove 1/>' containing_file="file:///Users/mseelig/Documents/workspace/steam_working/doc/bk.topic.of.quick_reference_f_doc.h2o"/> <test result="<vector 7 8/>
" on=tests.other_f_test name="Subvector" source="<vector 6 7 8 9/>.<subvector start=1 end=3/>" containing_file="file:///Users/mseelig/Documents/workspace/steam_working/doc/bk.topic.of.quick_reference_f_doc.h2o"/> <h3 "datetime, etc"/> <test result="50" on=tests.other_f_test name="Create datetime" source="<datetime year=2000 month=12 day=25 hour=5 &#13;
minute=50 second=45 millisecond=750/>.minute" containing_file="file:///Users/mseelig/Documents/workspace/steam_working/doc/bk.topic.of.quick_reference_f_doc.h2o"/> <test result="true" on=tests.other_f_test name="Now" source="datetime.<current/>.<is_a datetime/>" containing_file="file:///Users/mseelig/Documents/workspace/steam_working/doc/bk.topic.of.quick_reference_f_doc.h2o"/> <test result="<duration months=1 days=9/>
" on=tests.other_f_test name="Create duration" source="<duration months=1 days=9/>" containing_file="file:///Users/mseelig/Documents/workspace/steam_working/doc/bk.topic.of.quick_reference_f_doc.h2o"/> <test result="<date 2005 5 3/>
" on=tests.other_f_test name="date plus duration" source="<date 2005 4 1/>.<plus <duration days=32/>/>" containing_file="file:///Users/mseelig/Documents/workspace/steam_working/doc/bk.topic.of.quick_reference_f_doc.h2o"/> <h3 "Grouping expressions: do"/> <test result="1.0" on=tests.other_f_test name="Execute all ..." source="<do 0.<sin/> 0.<cos/> />" containing_file="file:///Users/mseelig/Documents/workspace/steam_working/doc/bk.topic.of.quick_reference_f_doc.h2o"/> <test result='"all done"' on=tests.other_f_test name="&amp; return last result" source='<do> <set x="all done"/> x </do>' containing_file="file:///Users/mseelig/Documents/workspace/steam_working/doc/bk.topic.of.quick_reference_f_doc.h2o"/> <test result="<h1 0=8/>
" on=tests.other_f_test name="Code within HTML" source="<h1> <do 2.<power 3/>/> </h1>" containing_file="file:///Users/mseelig/Documents/workspace/steam_working/doc/bk.topic.of.quick_reference_f_doc.h2o"/> <h3 "Conditional flow control: if"/> <test result='"just right"' on=tests.other_f_test name="Condition-action pairs, use do for big action, 'else' means true, return executed action" source='<if> number.double.pi.<more 4/> "high"&#13;
number.double.pi.<less 3/> <do> <echo "bug"/> "low" </do>&#13;
else "just right" &#13;
</if>' containing_file="file:///Users/mseelig/Documents/workspace/steam_working/doc/bk.topic.of.quick_reference_f_doc.h2o"/> <test result="null" on=tests.other_f_test name="Returns null if no match" source='<if> 3.<is 2/> "never happens" </if>' containing_file="file:///Users/mseelig/Documents/workspace/steam_working/doc/bk.topic.of.quick_reference_f_doc.h2o"/> <h3 "Iteration: for_each"/> <test result='<v 1 "b"/>
' on=tests.other_f_test name="Iterate over vector fields, return last" source='<vector "a" "b"/>.<for_each> <vector key value/></>' containing_file="file:///Users/mseelig/Documents/workspace/steam_working/doc/bk.topic.of.quick_reference_f_doc.h2o"/> <test result="15" on=tests.other_f_test name="Iterate over string fields" source="<thing a=7 b=8/>.<for_each include=string_key combiner=plus> &#13;
value </for_each>" containing_file="file:///Users/mseelig/Documents/workspace/steam_working/doc/bk.topic.of.quick_reference_f_doc.h2o"/> <test result="6" on=tests.other_f_test name="Iterate over 0 thru 3" source="4.<for_each combiner=plus> value </> <!-- 0.<plus 1 2 3/>-->" containing_file="file:///Users/mseelig/Documents/workspace/steam_working/doc/bk.topic.of.quick_reference_f_doc.h2o"/> <test result="<v 70 80 90/>
" on=tests.other_f_test name="Return vector of values" source="<vector 7 8 9/>.<for_each combiner=insert> value.<times 10/> </>" containing_file="file:///Users/mseelig/Documents/workspace/steam_working/doc/bk.topic.of.quick_reference_f_doc.h2o"/> <test result='<v "k1" "k2"/>
' on=tests.other_f_test name="Return filtered vector" source='<v "k1" "j1" "j2" "k2"/>.<for_each combiner=insert>&#13;
<if> value.<starts_with "k"/> value &#13;
else skip&#13;
</if> </for_each>' containing_file="file:///Users/mseelig/Documents/workspace/steam_working/doc/bk.topic.of.quick_reference_f_doc.h2o"/> <test result="<vector 98/>
" on=tests.other_f_test name="Exclude fields" source="<vector 97 98 99/>.<for_each exclude=<vector 0 2/> combiner=insert>&#13;
value </for_each>" containing_file="file:///Users/mseelig/Documents/workspace/steam_working/doc/bk.topic.of.quick_reference_f_doc.h2o"/> <h3 "Methods, Functions, Macros: method"/> <test result="5" on=tests.other_f_test name="method &amp; call" source="<method five> 5 </> <five/>" containing_file="file:///Users/mseelig/Documents/workspace/steam_working/doc/bk.topic.of.quick_reference_f_doc.h2o"/> <test result="6" on=tests.other_f_test name="One required arg" source="<method twice x=req> x.<plus x/> </> <twice 3/>" containing_file="file:///Users/mseelig/Documents/workspace/steam_working/doc/bk.topic.of.quick_reference_f_doc.h2o"/> <test result="ignore" on=tests.other_f_test name="Method on person" do_not_run=true source="person.&lt;method hire" containing_file="file:///Users/mseelig/Documents/workspace/steam_working/doc/bk.topic.of.quick_reference_f_doc.h2o"/> <test result="ignore" on=tests.other_f_test name="Required arg" do_not_run=true source="manager=req" containing_file="file:///Users/mseelig/Documents/workspace/steam_working/doc/bk.topic.of.quick_reference_f_doc.h2o"/> <test result="ignore" on=tests.other_f_test name="Typed arg" do_not_run=true source="position=req=string" containing_file="file:///Users/mseelig/Documents/workspace/steam_working/doc/bk.topic.of.quick_reference_f_doc.h2o"/> <test result="ignore" on=tests.other_f_test name="Default value" do_not_run=true source="date=<datetime/>.<current/>" containing_file="file:///Users/mseelig/Documents/workspace/steam_working/doc/bk.topic.of.quick_reference_f_doc.h2o"/> <test result="ignore" on=tests.other_f_test name="Optional, no default" do_not_run=true source="salary=opt=number" containing_file="file:///Users/mseelig/Documents/workspace/steam_working/doc/bk.topic.of.quick_reference_f_doc.h2o"/> <test result="ignore" on=tests.other_f_test name="End parameters" do_not_run=true source="&gt;" containing_file="file:///Users/mseelig/Documents/workspace/steam_working/doc/bk.topic.of.quick_reference_f_doc.h2o"/> <test result="ignore" on=tests.other_f_test name="Implementation" do_not_run=true source='<join "Boss: " manager " hires: " position />' containing_file="file:///Users/mseelig/Documents/workspace/steam_working/doc/bk.topic.of.quick_reference_f_doc.h2o"/> <test result="ignore" on=tests.other_f_test name="End method" do_not_run=true source="&lt;/method&gt;" containing_file="file:///Users/mseelig/Documents/workspace/steam_working/doc/bk.topic.of.quick_reference_f_doc.h2o"/> <test result='"Boss: J.B. hires: sales"' on=tests.other_f_test name="Call the method" do_not_run=true source='person.<hire "J.B." "sales"/>' containing_file="file:///Users/mseelig/Documents/workspace/steam_working/doc/bk.topic.of.quick_reference_f_doc.h2o"/> <test result='<v 9 "junk"/>
' on=tests.other_f_test name="Execution kinds permit delayed execution" source='<method m x=req=string=ekind.string> &#13;
<if> x.<starts_with "<"/> <execute source=x/> else x </if></>&#13;
<v <m <plus 4 5/>/> <m junk/>/>' containing_file="file:///Users/mseelig/Documents/workspace/steam_working/doc/bk.topic.of.quick_reference_f_doc.h2o"/> <h3 "Classes: class"/> <test result="person" on=tests.other_f_test name="Define class" source="<class person first=req last=opt zip=opt/>" containing_file="file:///Users/mseelig/Documents/workspace/steam_working/doc/bk.topic.of.quick_reference_f_doc.h2o"/> <test result="person" on=tests.other_f_test name="... with param types" source="<class person first=req=string &#13;
last=req=string zip=opt=integer/>" containing_file="file:///Users/mseelig/Documents/workspace/steam_working/doc/bk.topic.of.quick_reference_f_doc.h2o"/> <test result="ignore" on=tests.other_f_test name="Construct instance" source='<person zip=10483 first="Mike" last="Jones"/>' containing_file="file:///Users/mseelig/Documents/workspace/steam_working/doc/bk.topic.of.quick_reference_f_doc.h2o"/> <test result="ignore" on=tests.other_f_test name="...without keywords" source='<person "Mike" "Jones" 10483/>' containing_file="file:///Users/mseelig/Documents/workspace/steam_working/doc/bk.topic.of.quick_reference_f_doc.h2o"/> <test result="person.employee " on=tests.other_f_test name="Define subtype" source="<class person.employee/>" containing_file="file:///Users/mseelig/Documents/workspace/steam_working/doc/bk.topic.of.quick_reference_f_doc.h2o"/> <test result="person" on=tests.other_f_test name="Define a class with a method and a subtype" source='<class person last=req first=opt><!--put req params 1st-->&#13;
<method hire> "code" </method>&#13;
<class employee employee_id=req> "more defs" </> </class>' containing_file="file:///Users/mseelig/Documents/workspace/steam_working/doc/bk.topic.of.quick_reference_f_doc.h2o"/> <test result="ignore" on=tests.other_f_test name="Get subclass" source="person.employee <!-- classes hold subclasses in fields -->" containing_file="file:///Users/mseelig/Documents/workspace/steam_working/doc/bk.topic.of.quick_reference_f_doc.h2o"/> <test result="person" on=tests.other_f_test name="Special methods are : 'make' as constructor, 'to_htm' for display" source="<class person name=req>&#13;
<method make> _subject.<set age=10/> _subject </>&#13;
<method to_htm> <h1><do .name/></h1>.<to_htm/> </> </>" containing_file="file:///Users/mseelig/Documents/workspace/steam_working/doc/bk.topic.of.quick_reference_f_doc.h2o"/> <test result="ignore" on=tests.other_f_test name="Multiple inheritance" source='<<union <class car wheels=4/> <class boat hull="mono"/>/>&#13;
wheels=4 hull="twin"/>' containing_file="file:///Users/mseelig/Documents/workspace/steam_working/doc/bk.topic.of.quick_reference_f_doc.h2o"/> <h3 "Presentation: XHTML and Hypertext"/> <test result="ignore" on=tests.other_f_test name="All XHTML is included in Water" do_not_run=true source="html, body, table, form, script, style, div, span, b, i, etc.&#13;
(Tag names can use either upper or lower case.)" containing_file="file:///Users/mseelig/Documents/workspace/steam_working/doc/bk.topic.of.quick_reference_f_doc.h2o"/> <test result="ignore" on=tests.other_f_test name="Mix html and Water" source="<font size=3.<plus 4/>> <i>Now <do datetime.<current/>/></i></font>" containing_file="file:///Users/mseelig/Documents/workspace/steam_working/doc/bk.topic.of.quick_reference_f_doc.h2o"/> <test result="ignore" on=tests.other_f_test name="CSS" do_not_run=true source='<h1 style=<style color="red"/> >Title</h1>' containing_file="file:///Users/mseelig/Documents/workspace/steam_working/doc/bk.topic.of.quick_reference_f_doc.h2o"/> <h3 "Web server using HTML form"/> <test result="ignore" on=tests.other_f_test name="XHTML input" do_not_run=true source="form, input, select, textarea" containing_file="file:///Users/mseelig/Documents/workspace/steam_working/doc/bk.topic.of.quick_reference_f_doc.h2o"/> <test result="ignore" on=tests.other_f_test name="Web app on integer. Action is method to call with arg from input when submit button clicked" source='<method integer.square in=2>&#13;
<FORM action="/square">&#13;
Enter an integer:<INPUT name="in" value=in.<power 2/> />&#13;
<INPUT type="submit" value="Square It"/> </FORM></method>' containing_file="file:///Users/mseelig/Documents/workspace/steam_working/doc/bk.topic.of.quick_reference_f_doc.h2o"/> <test result="ignore" on=tests.other_f_test name="Launch server" source="<server integer port=9090/>" containing_file="file:///Users/mseelig/Documents/workspace/steam_working/doc/bk.topic.of.quick_reference_f_doc.h2o"/> <test result="ignore" on=tests.other_f_test name="Get page from Water" source='<resource "http://localhost:9090/square?"/>.content' containing_file="file:///Users/mseelig/Documents/workspace/steam_working/doc/bk.topic.of.quick_reference_f_doc.h2o"/> <test result="ignore" on=tests.other_f_test name="Browse the app" do_not_run=true source='<open_browser_window "http://localhost:9090/square?"/>' containing_file="file:///Users/mseelig/Documents/workspace/steam_working/doc/bk.topic.of.quick_reference_f_doc.h2o"/> <h3 "Importing/parsing"/> <test result="123" on=tests.other_f_test name="string to primitive" source='primitive.<from "123"/>' containing_file="file:///Users/mseelig/Documents/workspace/steam_working/doc/bk.topic.of.quick_reference_f_doc.h2o"/> <test result='<v "C" "Fry" "2"/>
' on=tests.other_f_test name="Returns vector" source='"C,Fry,2".<make_object field_separator=","/>' containing_file="file:///Users/mseelig/Documents/workspace/steam_working/doc/bk.topic.of.quick_reference_f_doc.h2o"/> <test result='<person first_name="M" last_name="Joy" zip="28840"/>
' on=tests.other_f_test name="Returns person" source='<class person first_name=req last_name=req zip="00000"/>&#13;
"M|Joy|28840".<make_object maker=person field_separator="|"/>' containing_file="file:///Users/mseelig/Documents/workspace/steam_working/doc/bk.topic.of.quick_reference_f_doc.h2o"/> <test result='<v <person "C" "Fry" "28838"/> <person "M" "Plusch" "02481"/>/>
' on=tests.other_f_test name="Vector of objects" source='"C,Fry,28838===M,Plusch,02481".&#13;
<make_objects person field_separator="," object_separator="==="/>' containing_file="file:///Users/mseelig/Documents/workspace/steam_working/doc/bk.topic.of.quick_reference_f_doc.h2o"/> <test result="'<body bgcolor=&quot;red&quot;>&#13;
hello&#13;
</body>'" on=tests.other_f_test name="Convert to XHTML" source='"<body bgcolor=red>hello</body>".<html_to_xhtml/>' containing_file="file:///Users/mseelig/Documents/workspace/steam_working/doc/bk.topic.of.quick_reference_f_doc.h2o"/> <h3 "Output"/> <test result='"<b>Water</b>"' on=tests.other_f_test name="Object to String" source="<b>Water</>.<to_htm/>" containing_file="file:///Users/mseelig/Documents/workspace/steam_working/doc/bk.topic.of.quick_reference_f_doc.h2o"/> <test result='"<thing>&#13;
<fields>weight=123 </fields></thing>"' on=tests.other_f_test name="Format XML 1.0" source="<thing weight=123/>.<to_xml/>" containing_file="file:///Users/mseelig/Documents/workspace/steam_working/doc/bk.topic.of.quick_reference_f_doc.h2o"/> <test result='"number.integer"' on=tests.other_f_test name="Make path if possible" source="number.integer.<to_cxs/>" containing_file="file:///Users/mseelig/Documents/workspace/steam_working/doc/bk.topic.of.quick_reference_f_doc.h2o"/> <test result='"thing size=xl"' on=tests.other_f_test name="Text, no markup" do_not_run=true source='<thing size="xl"/>.<to_txt/>' containing_file="file:///Users/mseelig/Documents/workspace/steam_working/doc/bk.topic.of.quick_reference_f_doc.h2o"/> <h3 "Tools"/> <test result="5" on=tests.other_f_test name="Print to Java console" source='<echo "X: " <plus 2 3/>/> <!-- all arg values printed-->' containing_file="file:///Users/mseelig/Documents/workspace/steam_working/doc/bk.topic.of.quick_reference_f_doc.h2o"/> <test result="8" on=tests.other_f_test name="Inspect object or path" do_not_run=true source='"foo".ii thing.<iip p/> 3.<plus 4/>.ii.<plus 1/>' containing_file="file:///Users/mseelig/Documents/workspace/steam_working/doc/bk.topic.of.quick_reference_f_doc.h2o"/> <test result="ignore" on=tests.other_f_test name="Make test case" source="<test result=5> 5.<minimum 8/> </test>" containing_file="file:///Users/mseelig/Documents/workspace/steam_working/doc/bk.topic.of.quick_reference_f_doc.h2o"/> <test result="ignore" on=tests.other_f_test name="Make documentation" source="<doc on=minimum> return the smallest number</doc>" containing_file="file:///Users/mseelig/Documents/workspace/steam_working/doc/bk.topic.of.quick_reference_f_doc.h2o"/>/> "
&#13;
<h3>Concise XML Syntax &nbsp; &nbsp; &nbsp; <i>source &nbsp; =&gt; &nbsp; result</i></>&#13;
&#13;
<test name=&quot;Full closing tag&quot; result=ignore> &#13;
<body> the content </body>&#13;
</test>&#13;
&#13;
<test name=&quot;Short closing tag&quot; result=ignore> &#13;
<body> the content </>&#13;
</test> &#13;
&#13;
<test name=&quot;No content&quot; result=ignore> &#13;
<body/>&#13;
</test> &#13;
&#13;
<test name=&quot;Attributes hold any object or expression&quot; result=4>&#13;
<thing age=<plus 2 2/> male=true/>.age&#13;
</test>&#13;
&#13;
<test name=&quot;Pass arg via keyword&quot; result=123>&#13;
<class boat weight=req/> &#13;
<boat weight=123/>.weight&#13;
</test> &#13;
&#13;
<test name=&quot;Pass arg via position&quot; result=123>&#13;
<class boat weight=req/> <boat 123/>.weight&#13;
</test>&#13;
&#13;
<test name=&quot;Comment&quot; result=ignore>&#13;
<!-- code in here is ignored. -->&#13;
</test>&#13;
&#13;
<test name=&quot;Subject of call&quot; result=5> &#13;
2.<plus 3/> <!-- 2 is the _subject of the call to plus -->&#13;
</>&#13;
&#13;
<h3>Object System: everything is an object</>&#13;
<test name=&quot;Objects&quot; result=ignore do_not_run=true> &#13;
Objects have fields, each of which has a key and a value.&#13;
Values can be any type of object. So can keys.&#13;
</test>&#13;
<test name=&quot;Root: Water Object&quot; result=wob> &#13;
<!-- all objects have both a _parent field and &#13;
wob as an ancestor, except wob itself --> wob&#13;
</test>&#13;
&#13;
<test name=&quot;Generic object&quot; result=thing> &#13;
thing <!-- a thing can have any fields -->&#13;
</test> &#13;
&#13;
<test name=&quot;Named &amp; vector fields&quot; result=ignore>&#13;
wob.<set foo=<thing x=100 y=555 20 30 40/> />&#13;
</test>&#13;
&#13;
<test name=&quot;value of field 'x'&quot; result=100> &#13;
wob.foo.x&#13;
</>&#13;
<test name=&quot;value of field 2&quot; result=40>&#13;
wob.foo.2&#13;
</>&#13;
&#13;
<test name=&quot;Instance of class?&quot; result=true> &#13;
10.<is_a number/>&#13;
</test> &#13;
&#13;
<!-- cut for space reasons &#13;
<test name=&quot;New copy&quot; result=<thing direction=&quot;up&quot;/>>&#13;
<thing direction=&quot;up&quot;/>.<copy/>&#13;
</test> -->&#13;
&#13;
<h3>Basic Operations: get, set, remove</>&#13;
&#13;
<test name=&quot;Dot notation&quot; result=5> <thing bar=5/>.bar </>&#13;
&#13;
<test name=&quot;Get value&quot; result=&quot;hi&quot;> <thing 6=&quot;hi&quot;/>.<get 2.<times 3/>/></>&#13;
&#13;
<test result=0>&#13;
<thing 6=&quot;hi&quot;/>.<get 5 lookup=false &#13;
if_missing=0/>&#13;
</test>&#13;
&#13;
&#13;
&#13;
<test name=&quot;Assign variable(s)&quot; result=&quot;value1&quot;> &#13;
<set key1=&quot;value1&quot; key2=&quot;value2&quot;/> key1</>&#13;
&#13;
<test name=&quot;Assign field&quot; result=&quot;wood&quot;>&#13;
thing.<set material=&quot;wood&quot;/> thing.material&#13;
</>&#13;
&#13;
<test name=&quot;Field exists?&quot; result=true>&#13;
thing.<has &quot;material&quot;/>&#13;
</test>&#13;
<test result=false>&#13;
thing.<has &quot;junk&quot;/>&#13;
</test>&#13;
&#13;
<test name=&quot;Remove field&quot; result=&quot;wood&quot;> &#13;
thing.<remove &quot;material&quot;/>&#13;
</test>&#13;
&#13;
<test result=false> &#13;
thing.<has &quot;material&quot;/>&#13;
</test>&#13;
&#13;
<h3>boolean: true and false</>&#13;
&#13;
<test name=&quot;and&quot; result=false>&#13;
true.<and false/>&#13;
</>&#13;
&#13;
<test name=&quot;or&quot; result=true> &#13;
true.<or false true/> &#13;
</>&#13;
&#13;
<test name=&quot;not&quot; result=false >&#13;
true.<not/> <not true/> 123.<not/> <!--any arg but false returns false-->&#13;
</test>&#13;
&#13;
<test name=&quot;Same object?&quot; result=true> 5.<is 5/> </>&#13;
&#13;
<test result=false> <thing/>.<is <thing/>/> </>&#13;
&#13;
<test name=&quot;Same valued fields&quot; result=true>&#13;
<thing foo=5/>.<equal <thing foo=5/> />&#13;
</test>&#13;
&#13;
<test name=&quot;false values using boolean.from. Other args result in true.&quot; result=false>&#13;
boolean.<from &quot;false&quot;/> boolean.<from &quot;no&quot;/> &#13;
boolean.<from &quot;null&quot;/> boolean.<from null/> &#13;
boolean.<from 0/> boolean.<from -1/>&#13;
<!-- all return false -->&#13;
</test>&#13;
&#13;
<h3>number</>&#13;
<test name=&quot;integer&quot; result=true> 42.<is_a integer/> </>&#13;
<test result=true> -1.<is_a integer/> </>&#13;
&#13;
<test name=&quot;double: floating point&quot; result=true> 4.53.<is_a number.double/></>&#13;
<test result=true> -0.11.<is_a number.double/></>&#13;
&#13;
<test name=&quot;Arithmetic&quot; result=ignore do_not_run=true> plus minus times divide remainder</> &#13;
<test name=&quot;plus&quot; result=5.3> 2.<plus 3.3/> </>&#13;
<test name=&quot;_subject defaults to 0&quot; result=9> &#13;
<plus 2 3 4/> <!--plus and times take any number of args-->&#13;
</test> &#13;
<test name=&quot;( 5 * 6 ) / 3 - 1&quot; result=9.0> 5.<times 6/>.<divide 3/>.<minus 1/></>&#13;
&#13;
<test name=&quot;Rounding&quot; result=5> integer.<from 5.3 direction='down'/> </>&#13;
&#13;
<test name=&quot;Modulus&quot; result=1> 10.<remainder 3/> </> &#13;
&#13;
<test name=&quot;Comparators&quot; result=true>&#13;
7.<more 5/> 5.<less 7/> 5.<more_or_equal 5/> 5.<less_or_equal 5/> &#13;
<!-- all return true -->&#13;
</test>&#13;
&#13;
&#13;
<h3>string</> &#13;
<test name=&quot;Create string&quot; result=&quot;a_string&quot;> &#13;
&quot;a_string&quot; 'a_string' <string>a_string</string> <![CDATA[a_string]]>&#13;
</test> &#13;
&#13;
<test name=&quot;Concatenate&quot; result=&quot;you2me&quot;>&#13;
&quot;you&quot;.<join 2 &quot;me&quot;/>&#13;
</test>&#13;
&#13;
<test name=&quot;Length&quot; result=5> &quot;Water&quot;.<length/> </>&#13;
&#13;
<test name=&quot;Get a character&quot; result=<char &quot;W&quot;/>> &quot;Water&quot;.0 </>&#13;
&#13;
<test name=&quot;Substring&quot; result=&quot;Wat&quot;> &quot;Water&quot;.<subvector start=0 end=3/> </>&#13;
&#13;
<test name=&quot;Index of value&quot; result=2> &quot;Water&quot;.<key_of <char &quot;t&quot;/> /> </>&#13;
&#13;
<test name=&quot;Replace string&quot; result=&quot;better&quot;> &quot;Water&quot;.<replace &quot;Wa&quot; &quot;bet&quot;/> </>&#13;
&#13;
<test name=&quot;Strings are interned&quot; result=true> &quot;a&quot;.<is &quot;a&quot;/> </>&#13;
&#13;
<test name=&quot;Loose equality&quot; result=true> &#13;
&quot; CM&quot;.<equal &quot;cm&quot; same_case=false same_whitespace=false/> </>&#13;
&#13;
<h3>Data collection or array: vector</> &#13;
&#13;
<test name=&quot;Create vectors&quot; result=ignore>&#13;
<vector 5 &quot;a&quot; &quot;bcd&quot;/> <vector> 5 &quot;a&quot; &quot;bcd&quot; </vector> &#13;
</test>&#13;
&#13;
<test name=&quot;synonym for vector&quot; result=ignore>&#13;
<v 5 &quot;a&quot; &quot;bcd&quot;/>&#13;
</test>&#13;
&#13;
<test name=&quot;Get field value&quot; result=&quot;a&quot;> &#13;
<vector 5 &quot;a&quot;/>.1&#13;
</test>&#13;
&#13;
<test name=&quot;Indirect&quot; result=&quot;a&quot;> &#13;
<set x=1/> <vector 5 &quot;a&quot;/>.<get x/>&#13;
</>&#13;
&#13;
<test name=&quot;Vector length&quot; result=2>&#13;
<vector 5 &quot;a&quot;/>.<length/>&#13;
</test> &#13;
&#13;
<test name=&quot;Sorting&quot; result=<vector &quot;a&quot; &quot;m&quot; &quot;x&quot;/>>&#13;
<vector &quot;m&quot; &quot;a&quot; &quot;x&quot; />.<sort/>&#13;
</test>&#13;
&#13;
<!-- &#13;
Good example but cut just to save space&#13;
<test name=&quot;Sorting on field&quot; result=<vector <thing x=3/> <thing x=5/> />>&#13;
<vector> <thing x=5/> <thing x=3/> </>.<sort &#13;
<method sort_by_field_x arg=req>&#13;
.x.<less arg.x/>&#13;
</>&#13;
/>&#13;
</test> --> &#13;
&#13;
<test name=&quot;Reverse&quot; result=<vector &quot;z&quot; &quot;y&quot; &quot;x&quot;/>>&#13;
<vector &quot;x&quot; &quot;y&quot; &quot;z&quot; />.<reverse/>&#13;
</test>&#13;
&#13;
<test name=&quot;2D vector&quot; result=6>&#13;
<set Q=<vector 4 5 <vector 6 7 8/> /> /> Q.2.0&#13;
</test>&#13;
&#13;
<!-- removed for space reasons.&#13;
<test name=&quot;Last value&quot; result=99> &#13;
<vector 5 10 99/>.<last/>&#13;
</test>&#13;
-->&#13;
&#13;
<test name=&quot;Get from end&quot; result=25>&#13;
<vector 5 10 15 20 25 30/>.<last 1/>&#13;
</test>&#13;
&#13;
<test name=&quot;Push value on end&quot; result=<vector &quot;a&quot; &quot;z&quot;/>>&#13;
<vector &quot;a&quot;/>.<insert &quot;z&quot;/>&#13;
</> &#13;
<test name=&quot;Insert at index&quot; result=<vector &quot;z&quot; &quot;a&quot;/> >&#13;
<vector &quot;a&quot;/>.<insert &quot;z&quot; at_key=0/>&#13;
</>&#13;
<test name=&quot;Append vector values&quot; result=<vector 6 7 8 9/>>&#13;
<v 6 7/>.<insert _other_unkeyed=<v 8 9/> />&#13;
</test>&#13;
&#13;
&#13;
<!-- removed for space reasons&#13;
<test name=&quot;Remove first&quot; result=&quot;a&quot;>&#13;
<vector &quot;a&quot; &quot;b&quot;/>.<remove 0/>&#13;
</test> -->&#13;
&#13;
<test name=&quot;Remove&quot; result=&quot;b&quot;>&#13;
<vector &quot;a&quot; &quot;b&quot; &quot;c&quot;/>.<remove 1/>&#13;
</test>&#13;
&#13;
<test name=&quot;Subvector&quot; result=<vector 7 8 />>&#13;
<vector 6 7 8 9/>.<subvector start=1 end=3/>&#13;
</test>&#13;
&#13;
<!-- removed for space reasons&#13;
<test name=&quot;Optional 'end'&quot; result=<vector 11 12 13/>>&#13;
<vector 10 11 12 13/>.<subvector start=1/>&#13;
</> &#13;
<test name=&quot;Optional 'start'&quot; result=<vector 10 11/>>&#13;
<vector 10 11 12 13/>.<subvector end=2/>&#13;
</>&#13;
-->&#13;
&#13;
&#13;
<h3>datetime, etc</>&#13;
&#13;
<test name=&quot;Create datetime&quot; result=50>&#13;
<datetime year=2000 month=12 day=25 hour=5 &#13;
minute=50 second=45 millisecond=750/>.minute&#13;
</test>&#13;
&#13;
<test name=&quot;Now&quot; result=true>&#13;
datetime.<current/>.<is_a datetime/>&#13;
</test>&#13;
&#13;
<test name=&quot;Create duration&quot; result=<duration months=1 days=9/>>&#13;
<duration months=1 days=9/>&#13;
</test>&#13;
&#13;
<test name=&quot;date plus duration&quot; result=<date 2005 5 3/>>&#13;
<date 2005 4 1/>.<plus <duration days=32/>/>&#13;
</test>&#13;
&#13;
&#13;
&#13;
<h3>Grouping expressions: do</>&#13;
<test name=&quot;Execute all ...&quot; result=1.0> &#13;
<do 0.<sin/> 0.<cos/> />&#13;
</test>&#13;
&#13;
<test name=&quot;&amp; return last result&quot; result=&quot;all done&quot; <do> <set x=&quot;all done&quot;/> x </do>/>&#13;
&#13;
<test name=&quot;Code within HTML&quot; result=<h1 0=8/> >&#13;
<h1> <do 2.<power 3/>/> </h1>&#13;
</test>&#13;
&#13;
<h3>Conditional flow control: if</>&#13;
<test name=&quot;Condition-action pairs, use do for big action, 'else' means true, return executed action&quot; result=&quot;just right&quot;>&#13;
<if> number.double.pi.<more 4/> &quot;high&quot;&#13;
number.double.pi.<less 3/> <do> <echo &quot;bug&quot;/> &quot;low&quot; </do>&#13;
else &quot;just right&quot; &#13;
</if>&#13;
</test> &#13;
&#13;
<test name=&quot;Returns null if no match&quot; result=null>&#13;
<if> 3.<is 2/> &quot;never happens&quot; </if>&#13;
</test>&#13;
&#13;
&#13;
&#13;
&#13;
<h3>Iteration: for_each</>&#13;
&#13;
<test name=&quot;Iterate over vector fields, return last&quot; result=<v 1 &quot;b&quot;/>>&#13;
<vector &quot;a&quot; &quot;b&quot;/>.<for_each> <vector key value/></>&#13;
</test>&#13;
&#13;
<test name=&quot;Iterate over string fields&quot; result=15>&#13;
<thing a=7 b=8/>.<for_each include=string_key combiner=plus> &#13;
value </for_each>&#13;
</test>&#13;
&#13;
<test name=&quot;Iterate over 0 thru 3&quot; result=6>&#13;
4.<for_each combiner=plus> value </> <!-- 0.<plus 1 2 3/>-->&#13;
</test>&#13;
&#13;
&#13;
<test name=&quot;Return vector of values&quot; result=<v 70 80 90/>>&#13;
<vector 7 8 9/>.<for_each combiner=insert> value.<times 10/> </>&#13;
</test>&#13;
&#13;
<test name=&quot;Return filtered vector&quot; result=<v &quot;k1&quot; &quot;k2&quot;/> >&#13;
<v &quot;k1&quot; &quot;j1&quot; &quot;j2&quot; &quot;k2&quot;/>.<for_each combiner=insert>&#13;
<if> value.<starts_with &quot;k&quot;/> value &#13;
else skip&#13;
</if> </for_each>&#13;
</test>&#13;
&#13;
<test name=&quot;Exclude fields&quot; result=<vector 98/>>&#13;
<vector 97 98 99/>.<for_each exclude=<vector 0 2/> combiner=insert>&#13;
value </for_each>&#13;
</test> &#13;
&#13;
<h3>Methods, Functions, Macros: method</>&#13;
<test name=&quot;method &amp; call&quot; result=5>&#13;
<method five> 5 </> <five/>&#13;
</test>&#13;
<test name=&quot;One required arg&quot; result=6>&#13;
<method twice x=req> x.<plus x/> </> <twice 3/>&#13;
</test>&#13;
<test name=&quot;Method on person&quot; result=ignore do_not_run=true>&#13;
person.&lt;method hire &#13;
</test>&#13;
<test name=&quot;Required arg&quot; result=ignore do_not_run=true> &#13;
manager=req &#13;
</test>&#13;
<test name=&quot;Typed arg&quot; result=ignore do_not_run=true> &#13;
position=req=string &#13;
</test>&#13;
<test name=&quot;Default value&quot; result=ignore do_not_run=true> &#13;
date=<datetime/>.<current/>&#13;
</test> &#13;
<test name=&quot;Optional, no default&quot; result=ignore do_not_run=true> &#13;
salary=opt=number &#13;
</test>&#13;
<test name=&quot;End parameters&quot; result=ignore do_not_run=true> &#13;
&gt;&#13;
</test>&#13;
<test name=&quot;Implementation&quot; result=ignore do_not_run=true>&#13;
<join &quot;Boss: &quot; manager &quot; hires: &quot; position />&#13;
</test>&#13;
<test name=&quot;End method&quot; result=ignore do_not_run=true>&#13;
&lt;/method&gt; &#13;
</test>&#13;
&#13;
<test name=&quot;Call the method&quot; result=&quot;Boss: J.B. hires: sales&quot; do_not_run=true>&#13;
person.<hire &quot;J.B.&quot; &quot;sales&quot;/>&#13;
</test> &#13;
&#13;
<test name=&quot;Execution kinds permit delayed execution&quot; result=<v 9 &quot;junk&quot;/>>&#13;
<method m x=req=string=ekind.string> &#13;
<if> x.<starts_with &quot;<&quot;/> <execute source=x/> else x </if></>&#13;
<v <m <plus 4 5/>/> <m junk/>/>&#13;
</test> &#13;
&#13;
<!-- page 3 --> &#13;
<h3>Classes: class</> &#13;
<test name=&quot;Define class&quot; result=person>&#13;
<class person first=req last=opt zip=opt/>&#13;
</test>&#13;
&#13;
<test name=&quot;... with param types&quot; result=person>&#13;
<class person first=req=string &#13;
last=req=string zip=opt=integer/>&#13;
</test>&#13;
&#13;
<test name=&quot;Construct instance&quot; result=ignore>&#13;
<person zip=10483 first=&quot;Mike&quot; last=&quot;Jones&quot;/>&#13;
</test> &#13;
&#13;
<test name=&quot;...without keywords&quot; result=ignore>&#13;
<person &quot;Mike&quot; &quot;Jones&quot; 10483/>&#13;
</test>&#13;
&#13;
<test name=&quot;Define subtype&quot; result=person.employee> &#13;
<class person.employee/>&#13;
</test>&#13;
&#13;
<test name=&quot;Define a class with a method and a subtype&quot; result=person> &#13;
<class person last=req first=opt><!--put req params 1st-->&#13;
<method hire> &quot;code&quot; </method>&#13;
<class employee employee_id=req> &quot;more defs&quot; </> </class> &#13;
</test>&#13;
&#13;
<test name=&quot;Get subclass&quot; result=ignore> &#13;
person.employee <!-- classes hold subclasses in fields -->&#13;
</>&#13;
&#13;
<test name=&quot;Special methods are : 'make' as constructor, 'to_htm' for display&quot; result=person> &#13;
<class person name=req>&#13;
<method make> _subject.<set age=10/> _subject </>&#13;
<method to_htm> <h1><do .name/></h1>.<to_htm/> </> </>&#13;
</test>&#13;
&#13;
<test name=&quot;Multiple inheritance&quot; result=ignore> &#13;
<<union <class car wheels=4/> <class boat hull=&quot;mono&quot;/>/>&#13;
wheels=4 hull=&quot;twin&quot;/>&#13;
</test>&#13;
&#13;
<h3>Presentation: XHTML and Hypertext</> &#13;
<test name=&quot;All XHTML is included in Water&quot; result=ignore do_not_run=true>&#13;
html, body, table, form, script, style, div, span, b, i, etc.&#13;
(Tag names can use either upper or lower case.)&#13;
</test>&#13;
&#13;
<test name=&quot;Mix html and Water&quot; result=ignore>&#13;
<font size=3.<plus 4/>> <i>Now <do datetime.<current/>/></i></font>&#13;
</test>&#13;
&#13;
<test name=&quot;CSS&quot; result=ignore do_not_run=true> &#13;
<h1 style=<style color=&quot;red&quot;/> >Title</h1>&#13;
</test>&#13;
&#13;
<h3>Web server using HTML form</>&#13;
&#13;
<test name=&quot;XHTML input&quot; result=ignore do_not_run=true>&#13;
form, input, select, textarea&#13;
</test>&#13;
&#13;
<test name=&quot;Web app on integer. Action is method to call with arg from input when submit button clicked&quot; result=ignore>&#13;
<method integer.square in=2>&#13;
<FORM action=&quot;/square&quot;>&#13;
Enter an integer:<INPUT name=&quot;in&quot; value=in.<power 2/> />&#13;
<INPUT type=&quot;submit&quot; value=&quot;Square It&quot;/> </FORM></method>&#13;
</test>&#13;
&#13;
<test name=&quot;Launch server&quot; result=ignore>&#13;
<server integer port=9090/> &#13;
</test>&#13;
&#13;
<test name=&quot;Get page from Water&quot; result=ignore>&#13;
<resource &quot;http://localhost:9090/square?&quot;/>.content &#13;
</test>&#13;
&#13;
<test name=&quot;Browse the app&quot; result=ignore do_not_run=true>&#13;
<open_browser_window &quot;http://localhost:9090/square?&quot;/>&#13;
</test>&#13;
&#13;
&#13;
<h3>Importing/parsing</> &#13;
<test name=&quot;string to primitive&quot; result=123>&#13;
primitive.<from &quot;123&quot;/>&#13;
</test>&#13;
&#13;
<test name=&quot;Returns vector&quot; result=<v &quot;C&quot; &quot;Fry&quot; &quot;2&quot;/>>&#13;
&quot;C,Fry,2&quot;.<make_object field_separator=&quot;,&quot;/>&#13;
</test>&#13;
&#13;
<test name=&quot;Returns person&quot; result=<person first_name=&quot;M&quot; last_name=&quot;Joy&quot; zip=&quot;28840&quot;/>>&#13;
<class person first_name=req last_name=req zip=&quot;00000&quot;/>&#13;
&quot;M|Joy|28840&quot;.<make_object maker=person field_separator=&quot;|&quot;/>&#13;
</test> &#13;
&#13;
<test name=&quot;Vector of objects&quot; &#13;
result=<v <person &quot;C&quot; &quot;Fry&quot; &quot;28838&quot;/> <person &quot;M&quot; &quot;Plusch&quot; &quot;02481&quot;/>/>>&#13;
&quot;C,Fry,28838===M,Plusch,02481&quot;.&#13;
<make_objects person field_separator=&quot;,&quot; object_separator=&quot;===&quot;/>&#13;
</test> &#13;
&#13;
<test name=&quot;Convert to XHTML&quot; &#13;
result='<body bgcolor=&quot;red&quot;>&#13;
hello&#13;
</body>' &#13;
>&#13;
&quot;<body bgcolor=red>hello</body>&quot;.<html_to_xhtml/>&#13;
</test>&#13;
&#13;
<h3>Output</> &#13;
<test name=&quot;Object to String&quot; result= &quot;<b>Water</b>&quot; > &#13;
<b>Water</>.<to_htm/>&#13;
</test>&#13;
&#13;
<!-- cut due to space&#13;
<test name=&quot;null is empty string&quot; result=&quot;&quot;>&#13;
null.<to_htm/>&#13;
</test> -->&#13;
&#13;
<test name=&quot;Format XML 1.0&quot; result=&quot;<thing>&#13;
<fields>weight=123 </fields></thing>&quot;>&#13;
<thing weight=123/>.<to_xml/>&#13;
</test>&#13;
&#13;
<test name=&quot;Make path if possible&quot; result=&quot;number.integer&quot;> &#13;
number.integer.<to_cxs/>&#13;
</test>&#13;
&#13;
<test name=&quot;Text, no markup&quot; result=&quot;thing size=xl&quot; do_not_run=true> &#13;
<thing size=&quot;xl&quot;/>.<to_txt/>&#13;
</test>&#13;
&#13;
<h3>Tools</> &#13;
&#13;
<test name=&quot;Print to Java console&quot; result=5>&#13;
<echo &quot;X: &quot; <plus 2 3/>/> <!-- all arg values printed-->&#13;
</test>&#13;
&#13;
<test name=&quot;Inspect object or path&quot; result=8 do_not_run=true>&#13;
&quot;foo&quot;.ii thing.<iip p/> 3.<plus 4/>.ii.<plus 1/>&#13;
</test>&#13;
&#13;
<test name=&quot;Make test case&quot; result=ignore>&#13;
<test result=5> 5.<minimum 8/> </test>&#13;
</test>&#13;
&#13;
<test name=&quot;Make documentation&quot; result=ignore>&#13;
<doc on=minimum> return the smallest number</doc>&#13;
</test>&#13;
" on_path="bk.topic.of.quick_reference"/> <do false.chapter_group.of.advanced/>=<doc on=false.chapter_group.of.advanced on_path="bk.chapter_group.of.advanced"/> <do bk.chapter.of.water_contract/>=<doc on=bk.chapter.of.water_contract on_path="bk.chapter.of.water_contract"/> <do bk.chapter.of.thread/>=<doc on=bk.chapter.of.thread on_path="bk.chapter.of.thread"/> <do street_address/>=<doc on=street_address on_path="street_address"/> <do bk.chapter.of.html_layout/>=<doc on=bk.chapter.of.html_layout on_path="bk.chapter.of.html_layout"/> <do bk.topic.of.deploy_server/>=<doc on=bk.topic.of.deploy_server on_path="bk.topic.of.deploy_server"/> <do bk.chapter_group.of.flow/>=<doc on=bk.chapter_group.of.flow on_path="bk.chapter_group.of.flow"/> <do bk.chapter_group.of.method_class/>=<doc on=bk.chapter_group.of.method_class on_path="bk.chapter_group.of.method_class"/> <do bk.chapter.of.fields/>=<doc on=bk.chapter.of.fields on_path="bk.chapter.of.fields"/> <do bk.chapter.of.expression/>=<doc on=bk.chapter.of.expression on_path="bk.chapter.of.expression"/> <do bk.chapter.of.java_water/>=<doc on=bk.chapter.of.java_water on_path="bk.chapter.of.java_water"/> <do bk.chapter.of.soap_and_wsdl/>=<doc on=bk.chapter.of.soap_and_wsdl on_path="bk.chapter.of.soap_and_wsdl"/> <do bk.chapter.of.special_xml/>=<doc on=bk.chapter.of.special_xml on_path="bk.chapter.of.special_xml"/> <do bk.chapter.of.syntax/>=<doc on=bk.chapter.of.syntax on_path="bk.chapter.of.syntax"/> <do bk.chapter.of.regex/>=<doc on=bk.chapter.of.regex on_path="bk.chapter.of.regex"/> <do bk.chapter.of.boolean/>=<doc on=bk.chapter.of.boolean see_also=<vector boolean/> on_path="bk.chapter.of.boolean"/> <do width_height/>=<doc on=width_height on_path="width_height"/> <do bk.htm_index_entries/>=<doc on=bk.htm_index_entries content_vector=<vector "
&#13;
HTML format for an entry in the index.&#13;
If only one object in entry, and object name is same as&#13;
index entry key, then put hyperlink around index key,&#13;
otherwise, show index key, then links to each subpart.&#13;
"/> "
&#13;
HTML format for an entry in the index.&#13;
If only one object in entry, and object name is same as&#13;
index entry key, then put hyperlink around index key,&#13;
otherwise, show index key, then links to each subpart.&#13;
" on_path="bk.htm_index_entries"/> <do bk.chapter.of.ekind/>=<doc on=bk.chapter.of.ekind on_path="bk.chapter.of.ekind"/> <do lat_long/>=<doc on=lat_long on_path="lat_long"/> <do bk.chapter.of.type_system/>=<doc on=bk.chapter.of.type_system on_path="bk.chapter.of.type_system"/> <do bk.chapter.of.level_1_examples/>=<doc on=bk.chapter.of.level_1_examples on_path="bk.chapter.of.level_1_examples"/> <do bk.chapter_group.of.ui/>=<doc on=bk.chapter_group.of.ui on_path="bk.chapter_group.of.ui"/> <do bk.special_symbol.of.new_class/>=<doc on=bk.special_symbol.of.new_class on_path="bk.special_symbol.of.new_class"/> <do bk.chapter.of.rich_ui_layout/>=<doc on=bk.chapter.of.rich_ui_layout on_path="bk.chapter.of.rich_ui_layout"/> <do bk.topic.of.class_hierarchy/>=<doc on=bk.topic.of.class_hierarchy on_path="bk.topic.of.class_hierarchy"/> <do doc/>=<doc on=doc on_path="doc"/> <do bk.chapter_group.of.concurrent/>=<doc on=bk.chapter_group.of.concurrent on_path="bk.chapter_group.of.concurrent"/> <instances "true"=bk.term.of.true "false"=bk.term.of.false parameter=bk.term.of.parameter more=bk.term.of.more argument=bk.term.of.argument less_or_equal=bk.term.of.less_or_equal null=bk.term.of.null xml_header=bk.term.of.xml_header _name="of" less=bk.term.of.less language=bk.term.of.language variable=bk.term.of.variable local_variable=bk.term.of.local_variable bar=bk.term.of.bar syntax=bk.term.of.syntax foo=bk.term.of.foo doctype=bk.term.of.doctype more_or_equal=bk.term.of.more_or_equal/>=<doc on=<instances "true"=bk.term.of.true "false"=bk.term.of.false parameter=bk.term.of.parameter more=bk.term.of.more argument=bk.term.of.argument less_or_equal=bk.term.of.less_or_equal null=bk.term.of.null xml_header=bk.term.of.xml_header _name="of" less=bk.term.of.less language=bk.term.of.language variable=bk.term.of.variable local_variable=bk.term.of.local_variable bar=bk.term.of.bar syntax=bk.term.of.syntax foo=bk.term.of.foo doctype=bk.term.of.doctype more_or_equal=bk.term.of.more_or_equal/> on_path="bk.term.of"/> <do bk.chapter_group.of.object_to_string/>=<doc on=bk.chapter_group.of.object_to_string on_path="bk.chapter_group.of.object_to_string"/> <do bk.topic.of.standalone/>=<doc on=bk.topic.of.standalone on_path="bk.topic.of.standalone"/> <do bk.chapter.of.Method/>=<doc on=bk.chapter.of.Method on_path="bk.chapter.of.Method"/> <do bk.chapter_group.of.syntax/>=<doc on=bk.chapter_group.of.syntax on_path="bk.chapter_group.of.syntax"/> <do bk.chapter.of.html_input/>=<doc on=bk.chapter.of.html_input on_path="bk.chapter.of.html_input"/> <do bk.chapter.of.level_2_examples/>=<doc on=bk.chapter.of.level_2_examples on_path="bk.chapter.of.level_2_examples"/> <do bk.topic.of.hosted/>=<doc on=bk.topic.of.hosted on_path="bk.topic.of.hosted"/> <do bk.chapter.of.active_values/>=<doc on=bk.chapter.of.active_values on_path="bk.chapter.of.active_values"/> <do bk.chapter.of.format_other/>=<doc on=bk.chapter.of.format_other on_path="bk.chapter.of.format_other"/> <do bk.topic.of.inspect/>=<doc on=bk.topic.of.inspect on_path="bk.topic.of.inspect"/> <biz.places ui_view=<ui_view width=512 height=256 style=<style/> original_visible=true _nbr=0/> draggable=false _biz_id=0 _part_name_key="_biz_id"/>=<doc on=<biz.places ui_view=<ui_view width=512 height=256 style=<style/> original_visible=true _nbr=0/> draggable=false _biz_id=0 _part_name_key="_biz_id"/> on_path="biz.places.of.0"/>/>
_other_unkeyed=opt=wob=ekind.string="_add_to_environment"
/> |