on master help sign in
update docs with data type constructor information
commit797dd93de652f3698efd6ef604c25b26b1704706 authorAgentM <agentm@themactionfaction.com> dateWed 9 Aug 2017, 15:17 (9 years ago) parent40e1d8a
1 file changed+7−3
docs/tutd_tutorial.markdown+7−3
docs/tutd_tutorial.markdown+7−3
@@ -20,15 +20,19 @@ TutorialD is strongly-typed. The basic built-in types are:
2020
2121|Type Name|Explanation|Example|
2222|---------|-----------|-------|
23−|char|arbitrary text|"The Old Man and the Sea"|
23+|text|arbitrary text|"The Old Man and the Sea"|
2424|int|any integer|-4|
25−|datetime|timestamp UTC|"2015-02-02 04:05:02"::datetime|
25+|datetime|timestamp UTC|dateTimeFromEpochSeconds(1502304846)|
26+|date|calendar date|fromGregorian(2017,05,30)|
2627|double|floating point number|3.1459|
2728|bool|boolean value|t|
28−|bytestring|arbitrary-length string of bytes- input is base64-encoded|"dGVzdGRhdGE="::bytestring|
29+|bytestring|arbitrary-length string of bytes- input is base64-encoded|bytestring("dGVzdGRhdGE=")|
30+|interval x|interval/range type for ints, doubles, datetimes, and dates|interval(3,5,f,f)|
2931
3032With regards to boolean values, be sure not to conflate ```t``` or ```f``` as a boolean value with ```true``` and ```false``` which are relation variables.
3133
34+The ```interval``` function last two arguments are boolean values indicating whether the interval is open at the start point and end point respectively.
35+
3236Project:M36 will complain loudly if the expected types do not match. Automatic type coercion does not exist.
3337
3438```