https://github.com/davealdon/cos-roman-numeral-converter
📜 Converts numbers into roman numerals using ObjectScript
https://github.com/davealdon/cos-roman-numeral-converter
converter converters intersystems intersystems-cache intersystems-iris intersystems-samples numerals objectscript roman
Last synced: about 2 months ago
JSON representation
📜 Converts numbers into roman numerals using ObjectScript
- Host: GitHub
- URL: https://github.com/davealdon/cos-roman-numeral-converter
- Owner: DaveAldon
- License: mit
- Created: 2019-05-02T18:48:16.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2024-08-26T14:38:14.000Z (9 months ago)
- Last Synced: 2025-03-26T06:06:35.653Z (about 2 months ago)
- Topics: converter, converters, intersystems, intersystems-cache, intersystems-iris, intersystems-samples, numerals, objectscript, roman
- Language: ObjectScript
- Homepage: https://davealdon.github.io/Cos-Roman-Numeral-Converter/
- Size: 12.7 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ObjectScript Roman Numeral Converter
[](https://openexchange.intersystems.com/package/Objectscript-Roman-Numeral-Converter)
## Overview
This is an ObjectScript function to convert numbers to roman numerals. It also takes a dynamic array of numbers and turns them into roman numerals.
## Features
Takes in a number, or dynamic array of numbers, and turns them into roman numerals. Works up to 3,999. If you find a number that isn't accurate, please report it in the issues tab.
There is only one parameter:
* **val (Required String)**: The number or dynamic array to be converted.## Example Usage
```sh
USER> write ##class(RomanNumerals.RomanNumerals).Translate("12")
XIIUSER> set x = ["12","13"]
USER> write ##class(RomanNumerals.RomanNumerals).Translate(x)
11@%Library.DynamicArray
```Errors will be returned. If you don't use a number inside of a string, it won't respond with anything.
## Future Plans
Backwards translation support to convert roman numerals to a number.
Tweaking of conversion logic to support any roman numeral issues, especially over 3,999.## Version history
2019-07-23 - v1.0 - Initial commit of function with features outlined in description## Docker
### Prerequisites
Make sure you have [git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git) and [Docker desktop](https://www.docker.com/products/docker-desktop) installed.
### Installation
Clone/git pull the repo into any local directory
```
$ git clone https://github.com/rcemper/PR_CosNumberTranslate.git
```
```
$ docker compose up -d && docker compose logs -f
```To open IRIS Terminal do:
```
$ docker-compose exec iris iris session iris
USER>
```
or using **WebTerminal**
http://localhost:42773/terminal/To access IRIS System Management Portal
http://localhost:42773/csp/sys/UtilHome.csp