Rom2Arab

Rom2Arab - Arab2Rom - Messages

#1 Posted: 10/18/2023 10:06:10 PM
Valery Ochkov

Valery Ochkov

55 likes in 634 posts.

Group: User

Why doesn't the cycle end?
See please the attachRome-Arab.sm (40.3 KiB) downloaded 280 time(s).
#2 Posted: 10/19/2023 12:53:00 AM
Oscar Campo

Oscar Campo

126 likes in 301 posts.

Group: Moderator

Really it's a very strange bahavior (a bug ?), because the value of variable n is cleared when function returns from Arab2Rom()
So, a solution is to use functions fwrite() and rfile() to save the value of n on a file as a memory:

memory.png


See the atachment with the solution: Rome-Arab SOLVED.sm (41.21 KiB) downloaded 296 time(s).

best,
Oscar
1 users liked this post
Valery Ochkov 10/19/2023 1:08:00 AM
#3 Posted: 10/19/2023 1:30:20 AM
Alvaro Diaz Falconi

Alvaro Diaz Falconi

1,040 likes in 1,705 posts.

Group: User

Hi. In Arab2Rom(n) you modify n.

Clipboard02.png

That's not good practice. This is a workaround for such cases.

Clipboard01.png

Best regards.
Alvaro.
2 users liked this post
Valery Ochkov 10/19/2023 1:46:00 AM, Oscar Campo 10/19/2023 1:46:00 AM
#4 Posted: 10/19/2023 1:42:23 AM
Valery Ochkov

Valery Ochkov

55 likes in 634 posts.

Group: User

Thanks!

But this have an error too!
Rom2Arab.sm (293.29 KiB) downloaded 290 time(s).
#5 Posted: 10/19/2023 1:52:56 AM
Alvaro Diaz Falconi

Alvaro Diaz Falconi

1,040 likes in 1,705 posts.

Group: User

Wrote

Thanks!

But this have an error too!
Rom2Arab.sm (293.29 KiB) downloaded 290 time(s).



That's another function, not similar with the others above. Here the problem is the origin in Mathcad for strings. Try to set ORIGIN = 1 in Mathcad and rewrite the code.

Best regards.
Alvaro.
#6 Posted: 10/19/2023 2:13:24 AM
Valery Ochkov

Valery Ochkov

55 likes in 634 posts.

Group: User

Wrote

Wrote

Thanks!

But this have an error too!
Rom2Arab.sm (293.29 KiB) downloaded 290 time(s).



That's another function, not similar with the others above. Here the problem is the origin in Mathcad for strings. Try to set ORIGIN = 1 in Mathcad and rewrite the code.

Best regards.
Alvaro.


RA.png

#7 Posted: 10/19/2023 2:43:57 AM
Alvaro Diaz Falconi

Alvaro Diaz Falconi

1,040 likes in 1,705 posts.

Group: User

This is one way.

Clipboard01.png

Best regards.
Alvaro.
1 users liked this post
Valery Ochkov 10/19/2023 2:49:00 AM
#8 Posted: 10/19/2023 2:49:12 AM
Valery Ochkov

Valery Ochkov

55 likes in 634 posts.

Group: User

Wrote

This is one way.

Clipboard01.png

Best regards.
Alvaro.



Thanks,
send please the sm-file!
#9 Posted: 10/23/2023 12:30:24 AM
Valery Ochkov

Valery Ochkov

55 likes in 634 posts.

Group: User

My salary in 1980
ATM-SU.png
ATM-SU.sm (6.29 KiB) downloaded 290 time(s).
Rubles.png
#10 Posted: 10/23/2023 1:34:42 AM
Martin Kraska

Martin Kraska

1,260 likes in 2,186 posts.

Group: Moderator

If I remember correctly, 1988 a bottle of vodka (0.5l) was 3 rubles (if you got it at all, it was the time of prohibition - сухой закон). Therefore the 3-ruble-notes.
Martin KraskaPre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
1 users liked this post
Valery Ochkov 10/23/2023 2:31:00 AM
#11 Posted: 10/23/2023 2:24:31 AM
Valery Ochkov

Valery Ochkov

55 likes in 634 posts.

Group: User

Wrote

If I remember correctly, 1988 a bottle of vodka (0.5l) was 3 rubles (if you got it at all, it was the time of prohibition - сухой закон). Therefore the 3-ruble-notes.



2 рубля 87 копеек = 2.75 vodka + 0.12 bottle.

Three constants of soviet students 3.14, 2.87, 2.72
vodka.png
#12 Posted: 10/28/2023 4:11:54 PM
Valery Ochkov

Valery Ochkov

55 likes in 634 posts.

Group: User

There are also zeros in Roman numerals. See my photo from Greenwich.
And four is written this way IIII and not that way IV because there are only 12 and not 13 digits.
Arabic-0.png
  • New Posts
  • No New Posts