{"name":"BIS_fnc_romanNumeral","operator":null,"title":"BIS fnc romanNumeral","type":"function","url":"https://community.bistudio.com/wiki/BIS_fnc_romanNumeral","revid":340860,"updated":"2023-05-12T16:49:46Z","groups":["Strings","Math"],"status":"ok","replaced_by":[],"games":[{"game":"arma3","name":"Arma 3","version":"1.00"}],"since":{"game":"arma3","name":"Arma 3","version":"1.00"},"arma3_since":"1.00","branch":null,"locality":{"argument":null,"effect":null,"server_exec":false},"exec":null,"description":"Convert integer to roman numerals (e.g. 42 becomes \"XLII\").","syntaxes":[{"syntax":"integer call BIS_fnc_romanNumeral","since":null,"effect":null,"exec":null,"params":[{"name":"integer","type":"Number, String, Code or Config, same as BIS_fnc_parseNumber (used in this function)","optional":false,"default":null,"description":"any **integer** between 1 and 3999","types":["Number","String","Code","Config","BIS fnc parseNumber"],"since":null,"text":"integer: Number, String, Code or Config, same as BIS_fnc_parseNumber (used in this function) - any **integer** between 1 and 3999"}],"returns":{"type":"String","types":["String"],"description":"roman numerals","text":"String - roman numerals"}}],"examples":[{"text":"```sqf\n1 call BIS_fnc_romanNumeral;        // returns \"I\"\n2035 call BIS_fnc_romanNumeral;    // returns \"MMXXXV\"\n3999 call BIS_fnc_romanNumeral;    // returns \"MMMCMXCIX\"\n```","code":["1 call BIS_fnc_romanNumeral;\t\t// returns \"I\"\n2035 call BIS_fnc_romanNumeral;\t// returns \"MMXXXV\"\n3999 call BIS_fnc_romanNumeral;\t// returns \"MMMCMXCIX\""]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["BIS_fnc_ordinalNumber","BIS_fnc_phoneticalWord"],"notes":[{"user":"Lou Montana","date":"2019-10-01T01:46:00Z","text":"A Roman numeral is read like this:\n\n|  |  |  |  |  |  |  |  |\n|---|---|---|---|---|---|---|---|\n| Numeral | I | V | X | L | C | D | M |\n| Value | 1 | 5 | 10 | 50 | 100 | 500 | 1000 |\n\n- It is read from left to right from the biggest numeral to the lowest*, adding up:\n- not entirely true, see subtractions below\n  - `DCLVII` = `D` → `C` → `L` → `V` → `I` → `I` = 500 + 100 + 50 + 5 + 1 + 1 = 657\n- A subtraction is done by writing **one** smaller numeral before a big one:\n  - 9 could be written `VIIII`, or `IX`: 1 and 10, meaning 10 - 1 = 9 / but `IIX` for 8 does not exist, only `VIII`\n- The same numeral can be put together multiple times, but *usually* (there is no standard, but the shorter version is usually preferred) up to the point where it can be subtracted from the numeral above the used one (subtraction still done with only **one** numeral):\n  - `IIII` = `IV`, `CCCC` = `CD`\n\nNow let's see if you can translate this one: `MCMLXXXV`. Tip: where it all started ;-) `MCMLXXXII` for the purists!\n\nTo learn more: **[Roman numerals on wikipedia](https://en.wikipedia.org/wiki/Roman_numerals)**"}],"categories":["Arma 3: Functions","Arma 3: New Functions","Function Group: Math","Function Group: Strings","Functions","Introduced with Arma 3 version 1.00"],"docblock":null,"filled_from_docblock":[]}