Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Discussion / Help With Roman Numerals

Author
Message
Libervurto
17
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 2nd Aug 2007 23:41 Edited at: 2nd Aug 2007 23:47
A while ago I wrote a program to convert decimal numbers to roman numerals. I've been trying to make this into a function but can't get it working.
If anyone can help that'd be great



[EDIT]
OH MY GOD! I hadn't changed "x" to "n", sorry guys

[EDIT]
Nope, still doesn't work


Printing inside the function seems to work (rem'd out)(although it prints three times? and one of them is 20???)

Your signature has been erased by a mod because it was rubbish.
Sinani201
17
Years of Service
User Offline
Joined: 16th Apr 2007
Location: Aperture Science Enrichment Center
Posted: 11th Aug 2007 07:22
It definitely has something to do with DATA statements...

Did someone say 3D scanning on my desk, or was that just an AdBot?
What happens when when you mix coke, pop rocks, vinegar, and baking soda?
Libervurto
17
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 11th Aug 2007 16:02
What? Why would you use data for this?

Your signature has been erased by a mod because it was rubbish.
Latch
17
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 14th Aug 2007 18:39
@Obese

Get rid of the recursion and unnecessary function parameters. Handle d inside the function:



Enjoy your day.
Libervurto
17
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 14th Aug 2007 20:18
@Latch
Thanks
Thats why I don't usually use old code

Your signature has been erased by a mod because it was rubbish.

Login to post a reply

Server time is: 2024-05-02 16:04:20
Your offset time is: 2024-05-02 16:04:20