Changes between Version 72 and Version 73 of IR2
- Timestamp:
- 05/04/21 20:41:55 (5 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
IR2
v72 v73 139 139 ID /* variable being declared */ 140 140 | direct-declarator '[' expr? ']' /* array of ... */ 141 | direct-declarator '(' type-list? ')' /* function consuming ... and returning ... */141 | direct-declarator '(' parameter-type-list? ')' /* function consuming ... and returning ... */ 142 142 | '(' declarator ')' 143 143 ; 144 144 type-name: ... /* same as declarator but without the ID */ 145 145 type-list: type-name (',' type-name)* ; 146 146 parameter-type-list: type-specifier declarator (type-specifier declarator)* ; 147 147 }}} 148 148 … … 242 242 Work in progress... 243 243 244 {{{ 245 $int $round($real x); // round to nearest integer 246 $int $floor($real x); // greatest integer less than or equal to 247 $int ceil($real x); // least integer greater than or equal to 248 $float<e,f> $roundf($real x, $int e, $int f); // PROBLEM this is not a parameterized type 249 250 }}} 251 252 244 253 * `round(e,t)`: returns value in numerical type `t` that is "closest" to the given value `e` 245 254 * add argument for rounding mode?
