Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of pymite by
int.c File Reference
Integer Object Type. More...
Go to the source code of this file.
Functions | |
| PmReturn_t | int_dup (pPmObj_t pint, pPmObj_t *r_pint) |
| Creates a duplicate Integer object. | |
| PmReturn_t | int_new (int32_t n, pPmObj_t *r_pint) |
| Creates a new Integer object. | |
| PmReturn_t | int_positive (pPmObj_t pobj, pPmObj_t *r_pint) |
| Implements the UNARY_POSITIVE bcode. | |
| PmReturn_t | int_negative (pPmObj_t pobj, pPmObj_t *r_pint) |
| Implements the UNARY_NEGATIVE bcode. | |
| PmReturn_t | int_bitInvert (pPmObj_t pobj, pPmObj_t *r_pint) |
| Implements the UNARY_INVERT bcode. | |
| PmReturn_t | int_print (pPmObj_t pint) |
| Sends out an integer object in decimal notation with MSB first. | |
| PmReturn_t | int_printHex (pPmObj_t pint) |
| Prints the Int object in ascii-coded hexadecimal out the platform output. | |
| PmReturn_t | int_pow (pPmObj_t px, pPmObj_t py, pPmObj_t *r_pn) |
| Returns by reference an integer that is x raised to the power of y. | |
| PmReturn_t | int_divmod (pPmObj_t px, pPmObj_t py, uint8_t op, pPmObj_t *r_pxopy) |
| Returns by reference the result of the selected operation. | |
Detailed Description
Integer Object Type.
Integer object type operations.
Definition in file int.c.
Function Documentation
| PmReturn_t int_bitInvert | ( | pPmObj_t | pobj, |
| pPmObj_t * | r_pint | ||
| ) |
| PmReturn_t int_divmod | ( | pPmObj_t | px, |
| pPmObj_t | py, | ||
| uint8_t | op, | ||
| pPmObj_t * | r_pxopy | ||
| ) |
Returns by reference the result of the selected operation.
- Parameters:
-
px The integer numerator py The integer denominator op The operator selector. '/' selects division, all else is modulus. r_pn Return by reference; New integer with value of x / y or x % y.
- Returns:
- Return status
| PmReturn_t int_dup | ( | pPmObj_t | pint, |
| pPmObj_t * | r_pint | ||
| ) |
| PmReturn_t int_negative | ( | pPmObj_t | pobj, |
| pPmObj_t * | r_pint | ||
| ) |
| PmReturn_t int_new | ( | int32_t | val, |
| pPmObj_t * | r_pint | ||
| ) |
| PmReturn_t int_positive | ( | pPmObj_t | pobj, |
| pPmObj_t * | r_pint | ||
| ) |
| PmReturn_t int_pow | ( | pPmObj_t | px, |
| pPmObj_t | py, | ||
| pPmObj_t * | r_pn | ||
| ) |
| PmReturn_t int_print | ( | pPmObj_t | pint ) |
| PmReturn_t int_printHex | ( | pPmObj_t | pint ) |
Generated on Tue Jul 12 2022 21:25:47 by
1.7.2
