{"id":98,"date":"2015-01-09T09:58:11","date_gmt":"2015-01-09T09:58:11","guid":{"rendered":"https:\/\/projects.lsv.ens-paris-saclay.fr\/orchidsdoc\/?page_id=98"},"modified":"2017-11-13T09:02:47","modified_gmt":"2017-11-13T09:02:47","slug":"types","status":"publish","type":"page","link":"https:\/\/projects.lsv.ens-paris-saclay.fr\/orchidsdoc\/?page_id=98","title":{"rendered":"Types"},"content":{"rendered":"<p>The language of Orchids is statically typed.<\/p>\n<p>Orchids knows about the following types.\u00a0 We first find the <em>basic types<\/em>, which can notably be used in database fields, or in array indices:<\/p>\n<p>&nbsp;<\/p>\n<table style=\"border: solid 1px black;\">\n<tbody>\n<tr style=\"background-color: lightsteelblue;\">\n<th>Type<\/th>\n<th>Description<\/th>\n<\/tr>\n<\/tbody>\n<tbody>\n<tr style=\"background-color: lightgrey;\">\n<td><code>int<\/code><\/td>\n<td>signed machine integers (32\/64 bit)<\/td>\n<\/tr>\n<tr style=\"background-color: white;\">\n<td><code>uint<\/code><\/td>\n<td>unsigned machine integers (32\/64 bit)<\/td>\n<\/tr>\n<tr style=\"background-color: lightgrey;\">\n<td><code>float<\/code><\/td>\n<td>floating-point numbers, corresponding to C&#8217;s <code>double<\/code><\/td>\n<\/tr>\n<tr style=\"background-color: white;\">\n<td><code>str<\/code><\/td>\n<td>text strings<\/td>\n<\/tr>\n<tr style=\"background-color: lightgrey;\">\n<td><code>bstr<\/code><\/td>\n<td>binary strings, i.e., raw data<\/td>\n<\/tr>\n<tr style=\"background-color: white;\">\n<td><code>regex<\/code><\/td>\n<td>compiled regular expression<\/td>\n<\/tr>\n<tr style=\"background-color: lightgrey;\">\n<td><code>ipv4<\/code><\/td>\n<td>IPv4 network address<\/td>\n<\/tr>\n<tr style=\"background-color: white;\">\n<td><code>ipv6<\/code><\/td>\n<td>IPv6 network address<\/td>\n<\/tr>\n<tr style=\"background-color: lightgrey;\">\n<td><code>ctime<\/code><\/td>\n<td>time, given as seconds since the Epoch (00:00:00 UTC, January 1, 1970)<\/td>\n<\/tr>\n<tr style=\"background-color: white;\">\n<td><code>timeval<\/code><\/td>\n<td>time duration, given as seconds and microseconds<\/td>\n<\/tr>\n<tr style=\"background-color: lightgrey;\">\n<td><code>snmpoid<\/code><\/td>\n<td><a title=\"SNMP\" href=\"https:\/\/en.wikipedia.org\/wiki\/Simple_Network_Management_Protocol\">SNMP<\/a> object identifier<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<\/p>\n<p>We then find the structured types.<\/p>\n<table style=\"border: solid 1px black;\">\n<tbody>\n<tr style=\"background-color: lightsteelblue;\">\n<th>Type<\/th>\n<th>Description<\/th>\n<\/tr>\n<\/tbody>\n<tbody>\n<tr style=\"background-color: white;\">\n<td><code>event<\/code><\/td>\n<td>Orchids event, as produced by Orchids modules<\/td>\n<\/tr>\n<tr style=\"background-color: lightgrey;\">\n<td><code>db[<\/code><em>type<\/em><sub>1<\/sub>,&#8230;,<em>type<sub>n<\/sub><\/em><code>]<\/code><\/td>\n<td>in memory database, namely set of <em>n<\/em>-tuples of elements of type <em>type<\/em><sub>1<\/sub>,&#8230;,<em>type<sub>n<\/sub><\/em> respectively; each <em>type<sub>i<\/sub><\/em> must be a basic type, among <code>str<\/code>, <code>bstr<\/code>, <code>int<\/code>, <code>uint<\/code>, <code>float<\/code>, <code>ipv4<\/code>, <code>ipv6<\/code>, <code>ctime<\/code>, <code>timeval<\/code>, <code>snmpoid<\/code><\/td>\n<\/tr>\n<tr style=\"background-color: white;\">\n<td><code>db[*]<\/code><\/td>\n<td>database of arbitrary tuple types; that is, the type of the empty database<\/td>\n<\/tr>\n<tr style=\"background-color: lightgrey;\">\n<td><code>[...[<\/code><em>type<\/em><code><\/code><\/td>\n<td><em>n<\/em>-dimensional array of elements of type <em>type<\/em> (<em>n<\/em> is the number of initial square brackets); the type of indices is not checked, apart from the fact that it should be a basic type<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The language of Orchids is statically typed. Orchids knows about the following types.\u00a0 We first find the basic types, which can notably be used in database fields, or in array indices: &nbsp; Type Description int signed machine integers (32\/64 bit) uint unsigned machine integers (32\/64 bit) float floating-point numbers, corresponding to C&#8217;s double str text &hellip; <a href=\"https:\/\/projects.lsv.ens-paris-saclay.fr\/orchidsdoc\/?page_id=98\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Types<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"open","template":"","meta":{"footnotes":""},"class_list":["post-98","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/projects.lsv.ens-paris-saclay.fr\/orchidsdoc\/index.php?rest_route=\/wp\/v2\/pages\/98","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/projects.lsv.ens-paris-saclay.fr\/orchidsdoc\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/projects.lsv.ens-paris-saclay.fr\/orchidsdoc\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/projects.lsv.ens-paris-saclay.fr\/orchidsdoc\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/projects.lsv.ens-paris-saclay.fr\/orchidsdoc\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=98"}],"version-history":[{"count":10,"href":"https:\/\/projects.lsv.ens-paris-saclay.fr\/orchidsdoc\/index.php?rest_route=\/wp\/v2\/pages\/98\/revisions"}],"predecessor-version":[{"id":648,"href":"https:\/\/projects.lsv.ens-paris-saclay.fr\/orchidsdoc\/index.php?rest_route=\/wp\/v2\/pages\/98\/revisions\/648"}],"wp:attachment":[{"href":"https:\/\/projects.lsv.ens-paris-saclay.fr\/orchidsdoc\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=98"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}