@@ -1332,23 +1332,21 @@ Also note that a parameter declaration without definition is redundant if a
1332
1332
[ typed parameter declaration] ( #typed-parameters ) for that parameter already
1333
1333
exists, as that already enforces that the parameter must be defined.
1334
1334
1335
- <div class =" note " >
1336
-
1337
- ** Note:** You may see the following special form in some standard library files:
1338
-
1339
- <pre >
1340
- param <em >name</em > auto;
1341
- </pre >
1342
-
1343
- for example,
1344
-
1345
- ```
1346
- param parent auto;
1347
- ```
1348
-
1349
- This is used to explicitly declare the built-in automatic parameters,
1350
- and should never be used outside the libraries.
1351
- </div >
1335
+ > [ !NOTE]
1336
+ > You may see the following special form in some standard library files:
1337
+ >
1338
+ > <pre >
1339
+ > param <em >name</em > auto;
1340
+ > </pre >
1341
+ >
1342
+ > for example,
1343
+ >
1344
+ > ```
1345
+ > param parent auto;
1346
+ > ```
1347
+ >
1348
+ > This is used to explicitly declare the built-in automatic parameters,
1349
+ > and should never be used outside the libraries.
1352
1350
1353
1351
## Data types
1354
1352
@@ -1712,16 +1710,13 @@ handled:
1712
1710
* A method can only be overridden by another method if it is declared
1713
1711
`default`.
1714
1712
1715
- <div class =" note " >
1716
-
1717
- ** Note:** An overridable built-in method is defined by a template
1718
- named as the object type. So, if you want to write a template that
1719
- overrides the ` read ` method of a register, and want to make
1720
- your implementation overridable, then your template must explicitly
1721
- instantiate the ` register ` template using a statement `is
1722
- register;`.
1723
-
1724
- </div >
1713
+ > [!NOTE]
1714
+ > An overridable built-in method is defined by a template
1715
+ > named as the object type. So, if you want to write a template that
1716
+ > overrides the `read` method of a register, and want to make
1717
+ > your implementation overridable, then your template must explicitly
1718
+ > instantiate the `register` template using a statement `is
1719
+ > register;`.
1725
1720
1726
1721
### Calling Methods
1727
1722
@@ -1911,12 +1906,9 @@ session struct_t s = { .y = { .i = 2, ... }, ... }
1911
1906
Also unlike C, designator lists are not supported, and designated initializers
1912
1907
for arrays are not supported.
1913
1908
1914
- <div class =" note " >
1915
-
1916
- ** Note:** Previously ` session ` variables were known as ` data `
1917
- variables.
1918
-
1919
- </div >
1909
+ > [!NOTE]
1910
+ > Previously `session` variables were known as `data`
1911
+ > variables.
1920
1912
1921
1913
## Saved variables
1922
1914
@@ -1970,14 +1962,11 @@ restricted to primitive data types, or structs or arrays containing
1970
1962
only data types that could be saved. Such types are called
1971
1963
[*serializable*](#serializable-types).
1972
1964
1973
- <div class =" note " >
1974
-
1975
- ** Note:** Saved variables are primarily intended for making checkpointable
1976
- state easier. For configuration, ` attribute ` objects should
1977
- be used instead. Additional data types for saved declarations are planned to
1978
- be supported.
1979
-
1980
- </div >
1965
+ > [!NOTE]
1966
+ > Saved variables are primarily intended for making checkpointable
1967
+ > state easier. For configuration, `attribute` objects should
1968
+ > be used instead. Additional data types for saved declarations are planned to
1969
+ > be supported.
1981
1970
1982
1971
## Hook Declarations
1983
1972
<pre>
@@ -2070,31 +2059,30 @@ arguments or return values. In fact, hook references are even
2070
2059
Two hook references of the same hook reference type can be compared for
2071
2060
equality, and are considered equal when they both reference the same hook.
2072
2061
2073
- <div class =" note " >
2074
- <b >Note:</b > Hooks have a notable shortcoming in their lack of configurability;
2075
- for example, there is no way to configure a hook to log an error when a message
2076
- is sent through the hook and there is no computation suspended on the hook to
2077
- act upon the message. Proper hook configurability is planned to be added by the
2078
- time or together with coroutines being introduced to DML. Until then, the
2079
- suggested approach is to create wrappers around usages of <tt >send_now()</tt >.
2080
- Hook reference types can be leveraged to cut down on the needed number of such
2081
- wrappers, for example:
2082
- <pre >
2083
- method send_now_checked_no_data(hook() h) {
2084
- local uint64 resumed = h.send_now();
2085
- if (resumed == 0) {
2086
- log error: "Unhandled message to hook";
2087
- }
2088
- }
2089
-
2090
- method send_now_checked_int(hook(int) h, int x) {
2091
- local uint64 resumed = h.send_now(x);
2092
- if (resumed == 0) {
2093
- log error: "Unhandled message to hook";
2094
- }
2095
- }
2096
- </pre >
2097
- </div >
2062
+ > [!NOTE]
2063
+ > Hooks have a notable shortcoming in their lack of configurability;
2064
+ > for example, there is no way to configure a hook to log an error when a message
2065
+ > is sent through the hook and there is no computation suspended on the hook to
2066
+ > act upon the message. Proper hook configurability is planned to be added by the
2067
+ > time or together with coroutines being introduced to DML. Until then, the
2068
+ > suggested approach is to create wrappers around usages of <tt>send_now()</tt>.
2069
+ > Hook reference types can be leveraged to cut down on the needed number of such
2070
+ > wrappers, for example:
2071
+ > <pre>
2072
+ > method send_now_checked_no_data(hook() h) {
2073
+ > local uint64 resumed = h.send_now();
2074
+ > if (resumed == 0) {
2075
+ > log error: "Unhandled message to hook";
2076
+ > }
2077
+ > }
2078
+ >
2079
+ > method send_now_checked_int(hook(int) h, int x) {
2080
+ > local uint64 resumed = h.send_now(x);
2081
+ > if (resumed == 0) {
2082
+ > log error: "Unhandled message to hook";
2083
+ > }
2084
+ > }
2085
+ > </pre>
2098
2086
2099
2087
## Object Declarations
2100
2088
@@ -3504,13 +3492,10 @@ cancel all suspended method calls associated with an object through that
3504
3492
object's `cancel_after()` method, as provided by the [`object`
3505
3493
template](dml-builtins.html#object).
3506
3494
3507
- <div class =" note " >
3508
-
3509
- ** Note:** We plan to extend the ` after ` statement to allow for users to
3510
- explicitly state what objects the suspended method call is to be associated
3511
- with.
3512
-
3513
- </div >
3495
+ > [!NOTE]
3496
+ > We plan to extend the `after` statement to allow for users to
3497
+ > explicitly state what objects the suspended method call is to be associated
3498
+ > with.
3514
3499
3515
3500
#### After Delay Statements
3516
3501
<pre>
@@ -3913,13 +3898,10 @@ the selected case.
3913
3898
DML currently only supports `#select` iteration on [compile-time list
3914
3899
constants](#list-expressions).
3915
3900
3916
- <div class =" note " >
3917
-
3918
- ** Note:** The ` select ` statement has been temporarily removed from DML 1.4 due
3919
- to semantic issues, and only the ` #select ` form may currently be used.
3920
- The ` select ` statement will be reintroduced in the near future.
3921
-
3922
- </div >
3901
+ > [!NOTE]
3902
+ > The `select` statement has been temporarily removed from DML 1.4 due
3903
+ > to semantic issues, and only the `#select` form may currently be used.
3904
+ > The `select` statement will be reintroduced in the near future.
3923
3905
3924
3906
### #if and #else Statements
3925
3907
<a id="if-else-statements"/>
0 commit comments