Recent

Author Topic: [SOLVED] Amount in words  (Read 1903 times)

Pe3s

  • Hero Member
  • *****
  • Posts: 533
Re: Amount in words
« Reply #15 on: March 21, 2023, 05:09:16 pm »
how should i correct these lines?
Code: Pascal  [Select][+][-]
  1.  else if (i > 3) and (digits[5]<>'') and (StrToInt(digits[5]) = 1) then
  2.         str := str + nastki[StrToInt(digits[4])] + ' ';
  3.  

KodeZwerg

  • Hero Member
  • *****
  • Posts: 2007
  • Fifty shades of code.
    • Delphi & FreePascal
Re: Amount in words
« Reply #16 on: March 21, 2023, 05:19:48 pm »
When you want to access element 5, than "i" must be greater or equal to "5", exemplary "i > 4" or "i >= 5"
« Last Edit: Tomorrow at 31:76:97 xm by KodeZwerg »

Pe3s

  • Hero Member
  • *****
  • Posts: 533
Re: Amount in words
« Reply #17 on: March 21, 2023, 06:09:52 pm »
Thank you all for your help :)

 

TinyPortal © 2005-2018