Forum > LCL

[SOLVED] Amount in words

(1/4) > >>

Pe3s:
Hello, I wanted to write a program that converts the amount into words. The program compiles, but when I try to convert, there is an error. How can I improve it?

Regards everyone :)

domasz:
https://4programmers.net/Delphi/Gotowce/Zapis_s%C5%82owny_liczby

Thaddy:
I remember a really old discussion about this subject on this forum.
I will edit this comment when I find it.
[edit]
https://forum.lazarus.freepascal.org/index.php/topic,20904.msg121671.html#msg121671

Roland57:
@Pe3s

Hello! It's hard to help without knowing the target language, but I see a mistake here:


--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---    if (i > 4) and (StrToInt(digits[5]) > 1) then        str := str + dziesiatki[ StrToInt(digits[5]) ] + ' '    else if (i > 3) and (digits[5]<>'') and (StrToInt(digits[5]) = 1) then // <---
What happens, for example, if i = 4?  ;D

Pe3s:
What could be the cause of the error

Navigation

[0] Message Index

[#] Next page

Go to full version