Home Applications Objectscript Roman Numeral Converter

Objectscript Roman Numeral Converter

This application is not supported by InterSystems Corporation. Please be notified that you use it at your own risk.
3.75
2 reviews
0
Awards
191
Views
0
IPM installs
0
0
Details
Releases
Reviews
Issues
Pull requests
📜 Converts numbers into roman numerals using ObjectScript

What's new in this version

Initial Release

ObjectScript Roman Numeral Converter

Gitter

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

USER> write ##class(RomanNumerals.RomanNumerals).Translate("12")
XII

USER> 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

Read more
Version
1.0.023 Jul, 2019
Category
Developer Environment
Works with
CachéInterSystems IRIS
First published
23 Jul, 2019
Last checked by moderator
27 Jun, 2023Works